Форум программистов, компьютерный форум, киберфорум
PHP для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.80/5: Рейтинг темы: голосов - 5, средняя оценка - 4.80
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11

Форма обратной связи

06.08.2018, 15:18. Показов 1055. Ответов 16
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Добрый день! Подскажите пож-та есть такой код php для форма обратной связи, но есть 2 проблемы:

1) Когда приходит письмо от ФОС в графе кому Иероглифы 2) Когда заполняешь форму на сайте, подсказки(типа Вы забыли написать фамилию или например Сообщение отправлено) тоже пишутся Иероглифами. Подскажите пож-та где в коде косяк =(



PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<?php 
    // Enter your Name here!
    $yourname = "Cemtorg";
 
    // Enter your Email Address here!
    $youremail = "zaocemtorg@gmail.com";
 
    // Enter your Desired Email Subject!
    $mailsubject = "Сообщение от формы обратной связи";
 
 // Allowed file types add file extensions!
    $allow_types = array ('image/pjpeg','image/gif','image/tiff','image/jpeg','image/png','application/msword','application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/pdf','aplication/xpdf','binary/octet-stream','application/x-rar-compressed','application/zip');
 
    // Maximum file size for attachments in KB.
    // 2048kb = 2MB, 1024kb = 1MB, 512kb = 1/2MB
    $max_file_size = 1024 * 1024 *2;
 
    $firstname = htmlentities(strip_tags(trim($_POST["firstname"])));
    $lastname = htmlentities(strip_tags(trim($_POST["lastname"])));
    $useremail = htmlentities(strip_tags(trim($_POST["useremail"])));
    $usersubject = htmlentities(strip_tags(trim($_POST["usersubject"])));
    $usermessage = htmlentities(strip_tags(trim($_POST["usermessage"])));
    $department = htmlentities(strip_tags(trim($_POST["department"])));
    $verification = htmlentities(strip_tags(trim($_POST["verification"])));
 
    if (empty($firstname)) {
        $text = "Внимание! Вы забыли написать Ваше имя";
        echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли написать Ваше имя</div>';
    } elseif (empty($lastname)) {
    $text = "Внимание! Вы забыли написать Фамилию";
    echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли написать Фамилию</div>';}
  //  } elseif (empty($useremail)) {
    //$text = "Внимание! Вы забыли указать Email";
  //      echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли указать Email</div>';
   // } elseif (!preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$useremail)) {
//  $text = "Внимание! Вы забыли написать нормальный Email";
 //       echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли написать нормальный Email</div>';
  //  } elseif (empty($usersubject)) {
//  $text = "Внимание! Вы забыли написать Тему сообщения";
 //       echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли написать Тему сообщения</div>';
   // } elseif (empty($usermessage)) {
//  $text = "Внимание! Вы забыли написать Сообщение";
  //      echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли написать Сообщение</div>';
   // } elseif (empty($department)) {
    //$text = "Внимание! Укажите кому вы хотите отправить письмо";
   //     echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Укажите кому вы хотите отправить письмо</div>';
   // } 
    //elseif (empty($_FILES['userfile1']['name'])) {
    //$text = "Внимание! Вы забыли выбрать файл";
    //    echo '<div class="contact-error-message"><i class="icon-close"></i>', iconv("UTF-8", "cp1251//TRANSLIT", $text),'</div>'; } 
    //elseif (array_search($_FILES['userfile1']['type'], $allow_types) === false) {
    //$text = "Внимание! Вы можете выбрать файлы только - Images & Psd, Doc Docx Pdf Rar Zip";
     //   echo '<div class="contact-error-message"><i class="icon-close"></i>', iconv("UTF-8", "cp1251//TRANSLIT", $text),'</div>';} 
     
     elseif ($_FILES['userfile1']['size'] > $max_file_size) {
    $text = "Внимание! Максимальный размер файла болжен быть не более - 2048 KB";
        echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Максимальный размер файла болжен быть не более - 2048 KB</div>';
    } elseif (empty($verification)) {
     $text = "Внимание! Вы забыли ввести код";   
        echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Вы забыли ввести код</div>';
    } elseif ($verification != '70') {
     $text = "Внимание! Введите правелиный код";   
        echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Введите правильный код</div>';
    } else {
 
        $random_file1 = uniqid();
        $finalname1 = $random_file1.$_FILES['userfile1']['name'];
 
        if ($_FILES['userfile1']['error'] == 0) {
            move_uploaded_file($_FILES['userfile1']['tmp_name'], '../upload/' .$finalname1);
 
        $mailOptionSMTP = false;
        if ($mailOptionSMTP == true) {
 
        require 'class.autoload.php';
        require 'message.php';
 
        $mail = new PHPMailer();
        $mail->IsSMTP();
        $mail->SMTPAuth = true;
        $mail->SMTPSecure = 'ssl';
        $mail->Host = 'your-smtp-host';
        $mail->Port = 465;
        $mail->Username = 'your-smtp-username';
        $mail->Password = 'your-smtp-password';
        $mail->IsHTML(true);
        $mail->From = $useremail;
        $mail->CharSet = "UTF-8";
        $mail->FromName = $firstname . $lastname;
        $mail->Encoding = "base64";
        $mail->Timeout = 200;
        $mail->ContentType = "text/html";
        $mail->addAddress($youremail, $yourname);
        $mail->Subject = $mailsubject;
        $mail->AddAttachment('../upload/'.$finalname1);
        $mail->Body = $message;
        $mail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
        $recipients = false;
        if ($recipients == true) {
            $recipients = array(
                "example@example.com" => "Имя получателя",
                "example@example.com" => "Имя получателя",
            );
 
            foreach ($recipients as $email => $name) {
                $mail->AddBCC($email, $name);
            }
        }
 
        if ($mail->Send()) {
 
            require 'automessage.php';
 
            $automail = new PHPMailer();
            $automail->IsSMTP();
            $automail->SMTPAuth = true;
            $automail->SMTPSecure = 'ssl';
            $automail->Host = 'your-smtp-host';
            $automail->Port = 465;
            $automail->Username = 'your-smtp-username';
            $automail->Password = 'your-smtp-password';
            $automail->From = $youremail;
            $automail->FromName = $yourname;
            $automail->isHTML(true);
            $automail->CharSet = "UTF-8";
            $automail->Encoding = "base64";
            $automail->Timeout = 200;
            $automail->ContentType = "text/html";
            $automail->AddAddress($useremail, $firstname . $lastname);
            $automail->Subject = "Мы получили ваше сообщение с сайта";
            $automail->Body = $automessage;
            $automail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
            if ($automail->Send()) {
                // Email has sent successfully.
                $text = "Поздравляем! Ваше сообщение отправленно.";
                echo '<div class="contact-success-message"><i class="icon-checkmark"></i>', iconv("UTF-8", "cp1251//TRANSLIT", $text),'</div>';
            } else {
                // Email have an Error.
                $text = "Внимание! Произошла ошибка.";
                echo '<div class="contact-error-message"><i class="icon-close"></i>', iconv("UTF-8", "cp1251//TRANSLIT", "windows-1251", $text),' - '.$mail->ErrorInfo;'</div>';
            }
                }
    } else {
 
        require 'class.autoload.php';
        require 'message.php';
 
        $mail = new PHPMailer();
        $mail->isSendmail();
        $mail->IsHTML(true);
        $mail->From = $useremail;
        $mail->CharSet = "UTF-8";
        $mail->FromName = $firstname . $lastname;
        $mail->Encoding = "base64";
        $mail->Timeout = 200;
        $mail->ContentType = "text/html";
        $mail->addAddress($youremail, $yourname);
        $mail->Subject = $mailsubject;
        $mail->AddAttachment('../upload/'.$finalname1);
        $mail->Body = $message;
        $mail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
        $recipients = false;
        if ($recipients == true) {
            $recipients = array(
                "example@example.com" => "Имя получателя",
                "example@example.com" => "Имя получателя",
            );
 
            foreach ($recipients as $email => $name) {
                $mail->AddBCC($email, $name);
            }
        }
 
        if ($mail->Send()) {
 
            require 'automessage.php';
 
            $automail = new PHPMailer();
            $automail->isSendmail();
            $automail->From = $youremail;
            $automail->FromName = $yourname;
            $automail->isHTML(true);
            $automail->CharSet = "UTF-8";
            $automail->Encoding = "base64";
            $automail->Timeout = 200;
            $automail->ContentType = "text/html";
            $automail->AddAddress($useremail, $firstname . $lastname);
            $automail->Subject = "Мы получили ваше сообщение с сайта Cemtorg.ru";
            $automail->Body = $automessage;
            $automail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
            if (!$automail->Send()) {
                // Email has sent successfully.
                $text = "Поздравляем! Ваше сообщение отправленно.";
                echo '<div class="contact-success-message"><i class="icon-checkmark"></i>Поздравляем! Ваше сообщение отправленно.</div>';
            } else {
                // Email have an Error.
                $text = "Внимание! Произошла ошибка.";
                echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Произошла ошибка. - '.$mail->ErrorInfo;'</div>';
            }
        }
        }
          } else {
    
    {
 
        require 'class.autoload.php';
        require 'message.php';
 
        $mail = new PHPMailer();
        $mail->isSendmail();
        $mail->IsHTML(true);
        $mail->From = $useremail;
        $mail->CharSet = "UTF-8";
        $mail->FromName = $firstname . $lastname;
        $mail->Encoding = "base64";
        $mail->Timeout = 200;
        $mail->ContentType = "text/html";
        $mail->addAddress($youremail, $yourname);
        $mail->Subject = $mailsubject;
        
        $mail->Body = $message;
        $mail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
        $recipients = false;
        if ($recipients == true) {
            $recipients = array(
                "example@example.com" => "Имя получателя",
                "example@example.com" => "Имя получателя",
            );
 
            foreach ($recipients as $email => $name) {
                $mail->AddBCC($email, $name);
            }
        }
 
        if ($mail->Send()) {
 
            require 'automessage.php';
 
            $automail = new PHPMailer();
            $automail->isSendmail();
            $automail->From = $youremail;
            $automail->FromName = $yourname;
            $automail->isHTML(true);
            $automail->CharSet = "UTF-8";
            $automail->Encoding = "base64";
            $automail->Timeout = 200;
            $automail->ContentType = "text/html";
            $automail->AddAddress($useremail, $firstname . $lastname);
            $automail->Subject = "Мы получили ваше сообщение с сайта Cemtorg.ru";
            $automail->Body = $automessage;
            $automail->AltBody = "Для просмотра этого сообщения используйте HTML";
 
            if ($automail->Send()) {
                // Email has sent successfully.
                $text = "Поздравляем! Ваше сообщение отправленно.";
                echo '<div class="contact-success-message"><i class="icon-checkmark"></i>Поздравляем! Ваше сообщение отправленно.</div>';
            } else {
                // Email have an Error.
                $text = "Внимание! Произошла ошибка.";
                echo '<div class="contact-error-message"><i class="icon-close"></i>Внимание! Произошла ошибка. - '.$mail->ErrorInfo;'</div>';
            }
        }
      }
    
    
    
    
    
    
    
    }
  }
?>
0
IT_Exp
Эксперт
34794 / 4073 / 2104
Регистрация: 17.06.2006
Сообщений: 32,602
Блог
06.08.2018, 15:18
Ответы с готовыми решениями:

Как сделать чтоб форма обратной связи не отправляла письмо если форма не заполнена
Добрый день. Подскажите пожалуйста как сделать чтоб форма обратной связи не отправляла письмо если форма не заполнена.

Форма обратной связи!
Доброго времени суток! Не отправляет форму на почту ( выводит ошибку: Mailer Error: Language string failed to load: instantiate (На...

Форма обратной связи
Здравствуйте! Подскажите пожалуйста мне! Есть такой код: &lt;?php $message = &quot;Вот письмо: \nИмя:...

16
1152 / 554 / 320
Регистрация: 21.06.2012
Сообщений: 1,854
06.08.2018, 16:26
1. удаляем маркер BOM в первой строке (в нотпад "Кодировки" -> "Преобразовать в utf-8 без BOM")
2. указываем кодировку страницы в хэдере:
PHP
1
2
3
4
5
<?php 
    header('Content-Type: text/html; charset=utf-8');
 
    // Enter your Name here!
    $yourname = "Cemtorg";
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
06.08.2018, 16:53  [ТС]
Добавлено через 18 секунд
sasha0012, Сделал все как вы написали - не помогло
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
07.08.2018, 14:51
Soulful,
Скачай архив, там файл, называется index.php, в нем тот же самый код который ты привел только файл в нужном формате, переименуй его в свой файл, замени свой файл тем что переименовал --- "кракозябры" должны пропасть...
Вложения
Тип файла: zip Архив ZIP - WinRAR.zip (2.9 Кб, 2 просмотров)
0
 Аватар для CoderHuligan
1744 / 1009 / 257
Регистрация: 30.06.2015
Сообщений: 5,118
Записей в блоге: 56
07.08.2018, 16:29
А это что:
PHP
1
п»ї<?php
Перед тегом не должно быть никаких других символов.
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
08.08.2018, 12:39  [ТС]
zlojnaxa,
Заменил, форма вообще перестала работать. =(

Добавлено через 43 секунды
CoderHuligan,
Видимо когда вставлял на сайт что то лишние приписал, в оригинале все в порядке.

Добавлено через 11 минут
zlojnaxa,
Подкорректировал, форма опять заработала, когда заполняешь данные стал писать пояснения на русском, но при отправке сообщения теперь начал выдавать вот такую ошибку: Внимание! Произошла ошибка. - Could not access file: ../upload/5b6ab7a2e06d1, + на почту в графе кому все равно приходит странное содержание: ПÐ&deg;вÐ&micro;Ð&raquo;АÑ&bdquo;онÑ&Dag ger;иков (пример)

Добавлено через 5 минут
zlojnaxa,
За отправку на почту отвечает другой файл: message.php, возможно там нужно искать проблему, но для начала хотелось бы разобраться с первой проблемой.
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
08.08.2018, 12:42
Цитата Сообщение от Soulful Посмотреть сообщение
но для начала хотелось бы разобраться с первой проблемой
Проблема может вытекать как раз из другого файла, если есть что-нибудь типа include require и т.д.
Выкладывайте полный код message.php
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
08.08.2018, 12:44  [ТС]
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<?php 
 
$message = '
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>EMAIL TEMPLATE</title>
        <style type="text/css">
 
            /* ---------- EMAIL CLIENT STYLES ---------- */
            #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
            .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
            .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
            body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;} /* Prevent WebKit and Windows mobile changing default text sizes */
            table, td{mso-table-lspace:0pt; mso-table-rspace:0pt;} /* Remove spacing between tables in Outlook 2007 and up */
 
            /* ---------- RESET STYLES ---------- */
 
            body{margin:0; padding:0;}
            table{border-collapse:collapse !important;}
            body, #bodyTable, #bodyCell{height:100% !important; margin:0; padding:0; width:100% !important;}
 
            /* ---------- TEMPLATE STYLES ---------- */
 
            #bodyCell{padding:20px;}
            #templateContainer{width:600px;}
 
            body, #bodyTable{
                /*@editable*/ background-color:#fff;
            }
 
            /* ---------- TYPOGRAPHY STYLES ---------- */
 
            h1{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:22px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h2{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:20px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h3{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:18px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h4{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:20px;
                margin-left:0;
                padding-top:0;
                padding-right:0;
                padding-bottom:20px;
                padding-left:0;
                border-bottom:1px solid #ddd;
                /*@editable*/ text-align:left;
            }
 
            /* ---------- HEADER STYLES ---------- */
 
            #templateHeader{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:0;
                /*@editable*/ border-right:0;
                /*@editable*/ border-left:0;
                /*@editable*/ border-bottom:5px solid #de5f41;
            }
 
            .headerContent{
                /*@editable*/ line-height:125%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ margin:0;
            }
 
            .headerContent a:link, .preheaderContent a:visited, /* Yahoo! Mail Override */ .preheaderContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:underline;
            }
 
            .headerContent p {
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ margin:0;
                /*@editable*/ text-align:center;
            }
 
            /* ---------- BODY STYLES ---------- */
 
            #templateBody{
                /*@editable*/ background-color:#fff;
                /*@editable*/ border-top:0;
                /*@editable*/ border-bottom:0;
                /*@editable*/ border-right:1px solid #ddd;
                /*@editable*/ border-left:1px solid #ddd;
            }
 
            .bodyContent{
                /*@editable*/ line-height:150%;
            }
 
            .bodyContent h4{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ text-align:center;
            }
 
            .bodyContent p{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:left;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-left:20px;
                /*@editable*/ padding-top:0;
                /*@editable*/ padding-bottom:15px;
                /*@editable*/ margin:0;
            }
 
            .bodyContent a:link, .bodyContent a:visited, /* Yahoo! Mail Override */ .bodyContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
            }
 
            /* ---------- FOOTER STYLES ---------- */
 
            #templateFooter{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:5px solid #de5f41;
            }
 
            .footerContent{
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ padding-left:20px;
            }
 
            .footerContent a:link, .footerContent a:visited, /* Yahoo! Mail Override */ .footerContent a .yshortcuts, .footerContent a span /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
                /*@editable*/ text-align:center;
            }
 
            .footerContent p{
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:center;
                /*@editable*/ margin:0;
            }
 
            /* ---------- MOBILE STYLES ---------- */
 
            @media only screen and (max-width: 480px){
                body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */
                body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */
 
                /* ---------- MOBILE RESET STYLES ---------- */
 
                #bodyCell{padding:10px !important;}
 
                /* ---------- MOBILE TEMPLATE STYLES ---------- */
 
                #templateContainer{
                    max-width:600px !important;
                    /*@editable*/ width:100% !important;
                }
 
                p{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h1{
                    /*@editable*/ font-size:24px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h2{
                    /*@editable*/ font-size:20px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h3{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h4{
                    /*@editable*/ font-size:16px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                /* ---------- BODY STYLES ---------- */
 
                .bodyContent{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:125% !important;
                }
 
                /* ---------- FOOTER STYLES ---------- */
 
                .footerContent{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:115% !important;
                }
 
                .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */
            }
        </style>
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
        <center>
            <table align="center" cellpadding="0" border="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader">
                                        <tr>
                                            <td valign="top" width="180" class="headerContent" mc:edit="header_content">
                                                <p>Email не отображается правельно?&nbsp;&nbsp;<a href="#" target="_blank">Откройте сообщение в браузере</a><p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody">
                                        <tr>
                                            <td valign="top" class="bodyContent" mc:edit="body_content">
                                                <h4>Вы получили новое письмо с формы обратной связи сайта.</h4>
                                                <p>Товарищ: '.$_POST["firstname"].' '.$_POST["lastname"].' написал.</p>
                                                <p>Email: '.$_POST["useremail"].'</p>
                                                <p>Тема письма: '.$_POST["usersubject"].'</p>
                                                <p>Сообщение: '.$_POST["usermessage"].'</p>
                                                <p>Адресованно: '.$_POST["department"].'</p>
                                                <p>Приложенный файл: <a href="#">'.$_FILES['userfile1']['name'].'</a></p>
                                                
                                                
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter">
                                        <tr>
                                            <td valign="top" class="footerContent" mc:edit="footer_content">
                                                <p>Copyright &copy; 2013 <a href="#">Cemtorg.ru</a> Все права принадлежат нам.</p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';
?>
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
08.08.2018, 12:44  [ТС]
zlojnaxa,
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<?php 
 
$message = '
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>EMAIL TEMPLATE</title>
        <style type="text/css">
 
            /* ---------- EMAIL CLIENT STYLES ---------- */
            #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
            .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
            .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
            body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;} /* Prevent WebKit and Windows mobile changing default text sizes */
            table, td{mso-table-lspace:0pt; mso-table-rspace:0pt;} /* Remove spacing between tables in Outlook 2007 and up */
 
            /* ---------- RESET STYLES ---------- */
 
            body{margin:0; padding:0;}
            table{border-collapse:collapse !important;}
            body, #bodyTable, #bodyCell{height:100% !important; margin:0; padding:0; width:100% !important;}
 
            /* ---------- TEMPLATE STYLES ---------- */
 
            #bodyCell{padding:20px;}
            #templateContainer{width:600px;}
 
            body, #bodyTable{
                /*@editable*/ background-color:#fff;
            }
 
            /* ---------- TYPOGRAPHY STYLES ---------- */
 
            h1{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:22px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h2{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:20px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h3{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:18px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h4{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:20px;
                margin-left:0;
                padding-top:0;
                padding-right:0;
                padding-bottom:20px;
                padding-left:0;
                border-bottom:1px solid #ddd;
                /*@editable*/ text-align:left;
            }
 
            /* ---------- HEADER STYLES ---------- */
 
            #templateHeader{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:0;
                /*@editable*/ border-right:0;
                /*@editable*/ border-left:0;
                /*@editable*/ border-bottom:5px solid #de5f41;
            }
 
            .headerContent{
                /*@editable*/ line-height:125%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ margin:0;
            }
 
            .headerContent a:link, .preheaderContent a:visited, /* Yahoo! Mail Override */ .preheaderContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:underline;
            }
 
            .headerContent p {
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ margin:0;
                /*@editable*/ text-align:center;
            }
 
            /* ---------- BODY STYLES ---------- */
 
            #templateBody{
                /*@editable*/ background-color:#fff;
                /*@editable*/ border-top:0;
                /*@editable*/ border-bottom:0;
                /*@editable*/ border-right:1px solid #ddd;
                /*@editable*/ border-left:1px solid #ddd;
            }
 
            .bodyContent{
                /*@editable*/ line-height:150%;
            }
 
            .bodyContent h4{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ text-align:center;
            }
 
            .bodyContent p{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:left;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-left:20px;
                /*@editable*/ padding-top:0;
                /*@editable*/ padding-bottom:15px;
                /*@editable*/ margin:0;
            }
 
            .bodyContent a:link, .bodyContent a:visited, /* Yahoo! Mail Override */ .bodyContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
            }
 
            /* ---------- FOOTER STYLES ---------- */
 
            #templateFooter{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:5px solid #de5f41;
            }
 
            .footerContent{
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ padding-left:20px;
            }
 
            .footerContent a:link, .footerContent a:visited, /* Yahoo! Mail Override */ .footerContent a .yshortcuts, .footerContent a span /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
                /*@editable*/ text-align:center;
            }
 
            .footerContent p{
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:center;
                /*@editable*/ margin:0;
            }
 
            /* ---------- MOBILE STYLES ---------- */
 
            @media only screen and (max-width: 480px){
                body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */
                body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */
 
                /* ---------- MOBILE RESET STYLES ---------- */
 
                #bodyCell{padding:10px !important;}
 
                /* ---------- MOBILE TEMPLATE STYLES ---------- */
 
                #templateContainer{
                    max-width:600px !important;
                    /*@editable*/ width:100% !important;
                }
 
                p{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h1{
                    /*@editable*/ font-size:24px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h2{
                    /*@editable*/ font-size:20px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h3{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h4{
                    /*@editable*/ font-size:16px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                /* ---------- BODY STYLES ---------- */
 
                .bodyContent{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:125% !important;
                }
 
                /* ---------- FOOTER STYLES ---------- */
 
                .footerContent{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:115% !important;
                }
 
                .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */
            }
        </style>
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
        <center>
            <table align="center" cellpadding="0" border="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader">
                                        <tr>
                                            <td valign="top" width="180" class="headerContent" mc:edit="header_content">
                                                <p>Email не отображается правельно?&nbsp;&nbsp;<a href="#" target="_blank">Откройте сообщение в браузере</a><p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody">
                                        <tr>
                                            <td valign="top" class="bodyContent" mc:edit="body_content">
                                                <h4>Вы получили новое письмо с формы обратной связи сайта.</h4>
                                                <p>Товарищ: '.$_POST["firstname"].' '.$_POST["lastname"].' написал.</p>
                                                <p>Email: '.$_POST["useremail"].'</p>
                                                <p>Тема письма: '.$_POST["usersubject"].'</p>
                                                <p>Сообщение: '.$_POST["usermessage"].'</p>
                                                <p>Адресованно: '.$_POST["department"].'</p>
                                                <p>Приложенный файл: <a href="#">'.$_FILES['userfile1']['name'].'</a></p>
                                                
                                                
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter">
                                        <tr>
                                            <td valign="top" class="footerContent" mc:edit="footer_content">
                                                <p>Copyright &copy; 2013 <a href="#">Cemtorg.ru</a> Все права принадлежат нам.</p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';
?>
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
08.08.2018, 13:28
Soulful,
В архиве два файла:
1-ый файл содержит код который вы скинули первым
2-ой файл содержит код который вы скинули вторым
Проделайте ту же самую процедуру для 1-го файла и для 2-го:
скачать, извлечь, переименовать в свой файлы, заменить свои файлы переименованными.
Гарантии не даю но попытка не пытка
Вложения
Тип файла: zip Архив ZIP - WinRAR.zip (5.8 Кб, 3 просмотров)
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
08.08.2018, 21:09  [ТС]
zlojnaxa,
Сделал, но на мой емейл пока не приходит письмо с формой обратной связи, но приходит человеку, который отправлял, о том что письмо получено. за это отвечает ещё один файл. он пока что не корректно отображается, проблема та же -в графе кому не понятно что. можно попросить вас его тоже подредактировать чтобы проверить

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<?php
$automessage = '
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>EMAIL TEMPLATE</title>
        <style type="text/css">
 
            /* ---------- EMAIL CLIENT STYLES ---------- */
            #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
            .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
            .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
            body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;} /* Prevent WebKit and Windows mobile changing default text sizes */
            table, td{mso-table-lspace:0pt; mso-table-rspace:0pt;} 
            /* Remove spacing between tables in Outlook 2007 and up */
 
            /* ---------- RESET STYLES ---------- */
 
            body{margin:0; padding:0;}
            table{border-collapse:collapse !important;}
            body, #bodyTable, #bodyCell{height:100% !important; margin:0; padding:0; width:100% !important;}
 
            /* ---------- TEMPLATE STYLES ---------- */
 
            #bodyCell{padding:20px;}
            #templateContainer{width:600px;}
 
            body, #bodyTable{
                /*@editable*/ background-color:#fff;
            }
 
            /* ---------- TYPOGRAPHY STYLES ---------- */
 
            h1{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:22px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h2{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:20px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:bold;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h3{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:18px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:10px;
                margin-left:0;
                /*@editable*/ text-align:left;
            }
 
            h4{
                /*@editable*/ color:#999 !important;
                display:block;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ font-style:normal;
                /*@editable*/ font-weight:normal;
                /*@editable*/ line-height:100%;
                /*@editable*/ letter-spacing:normal;
                margin-top:0;
                margin-right:0;
                margin-bottom:20px;
                margin-left:0;
                padding-top:0;
                padding-right:0;
                padding-bottom:20px;
                padding-left:0;
                border-bottom:1px solid #ddd;
                /*@editable*/ text-align:left;
            }
 
            /* ---------- HEADER STYLES ---------- */
 
            #templateHeader{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:0;
                /*@editable*/ border-right:0;
                /*@editable*/ border-left:0;
                /*@editable*/ border-bottom:5px solid #de5f41;
            }
 
            .headerContent{
                /*@editable*/ line-height:125%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ margin:0;
            }
 
            .headerContent a:link, .preheaderContent a:visited, /* Yahoo! Mail Override */ .preheaderContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:underline;
            }
 
            .headerContent p {
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ margin:0;
                /*@editable*/ text-align:center;
            }
 
            /* ---------- BODY STYLES ---------- */
 
            #templateBody{
                /*@editable*/ background-color:#fff;
                /*@editable*/ border-top:0;
                /*@editable*/ border-bottom:0;
                /*@editable*/ border-right:1px solid #ddd;
                /*@editable*/ border-left:1px solid #ddd;
            }
 
            .bodyContent{
                /*@editable*/ line-height:150%;
            }
 
            .bodyContent h4{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:16px;
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ text-align:center;
            }
 
            .bodyContent p{
                /*@editable*/ color:#999;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:left;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-left:20px;
                /*@editable*/ padding-top:0;
                /*@editable*/ padding-bottom:15px;
                /*@editable*/ margin:0;
            }
 
            .bodyContent a:link, .bodyContent a:visited, /* Yahoo! Mail Override */ .bodyContent a .yshortcuts /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
            }
 
            /* ---------- FOOTER STYLES ---------- */
 
            #templateFooter{
                /*@editable*/ background-color:#272e38;
                /*@editable*/ border-top:5px solid #de5f41;
            }
 
            .footerContent{
                /*@editable*/ line-height:150%;
                /*@editable*/ padding-top:20px;
                /*@editable*/ padding-right:20px;
                /*@editable*/ padding-bottom:20px;
                /*@editable*/ padding-left:20px;
            }
 
            .footerContent a:link, .footerContent a:visited, /* Yahoo! Mail Override */ .footerContent a .yshortcuts, .footerContent a span /* Yahoo! Mail Override */{
                /*@editable*/ color:#de5f41;
                /*@editable*/ font-weight:normal;
                /*@editable*/ text-decoration:none;
                /*@editable*/ text-align:center;
            }
 
            .footerContent p{
                /*@editable*/ color:#fff;
                /*@editable*/ font-family:Helvetica;
                /*@editable*/ font-size:14px;
                /*@editable*/ text-align:center;
                /*@editable*/ margin:0;
            }
 
            /* ---------- MOBILE STYLES ---------- */
 
            @media only screen and (max-width: 480px){
                body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */
                body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */
 
                /* ---------- MOBILE RESET STYLES ---------- */
 
                #bodyCell{padding:10px !important;}
 
                /* ---------- MOBILE TEMPLATE STYLES ---------- */
 
                #templateContainer{
                    max-width:600px !important;
                    /*@editable*/ width:100% !important;
                }
 
                p{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h1{
                    /*@editable*/ font-size:24px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h2{
                    /*@editable*/ font-size:20px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h3{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                h4{
                    /*@editable*/ font-size:16px !important;
                    /*@editable*/ line-height:100% !important;
                }
 
                /* ---------- BODY STYLES ---------- */
 
                .bodyContent{
                    /*@editable*/ font-size:18px !important;
                    /*@editable*/ line-height:125% !important;
                }
 
                /* ---------- FOOTER STYLES ---------- */
 
                .footerContent{
                    /*@editable*/ font-size:14px !important;
                    /*@editable*/ line-height:115% !important;
                }
 
                .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */
            }
        </style>
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
        <center>
            <table align="center" cellpadding="0" border="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader">
                                        <tr>
                                            <td valign="top" width="180" class="headerContent" mc:edit="header_content">
                                                <p>Email не отображается правельно?&nbsp;&nbsp;<a href="#" target="_blank">Откройте в вашем браузере</a><p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody">
                                        <tr>
                                            <td valign="top" class="bodyContent" mc:edit="body_content">
                                                <h4>Вам отправили новое сообщение с сайта.</h4>
                                                <p>Добрый день '.$_POST["firstname"].' '.$_POST["lastname"].'</p>
                                                <p>Мы получили ваше сообщение с нашего сайта и ответим Вам в ближайшее время.</p>
                                                
                                                <p>Если вы хотите связаться с нами дополнительно используйте email адрес</p>
                                                <p>Наша почта: <a href="#">'.$youremail.'</a></p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter">
                                        <tr>
                                            <td valign="top" class="footerContent" mc:edit="footer_content">
                                                <p>Copyright &copy; 2013 <a href="#">Cemtorg.ru</a> Все права принадлежат нам.</p>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';
?>

п.с. форма вроде начала понимать русский.
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
08.08.2018, 21:51
Soulful,
Пробуйте...
Вложения
Тип файла: zip Архив ZIP - WinRAR.zip (2.6 Кб, 2 просмотров)
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
08.08.2018, 21:59  [ТС]
zlojnaxa,
Сделал, на мой мейл так и не приходит сообщения из ФОС, сообщение на почту того кто отправил пришло, но с той же проблемой

upd: пришло письмо и на мою почту, тоже с ошибкой. Там несовсем иероглифы приходят, вот пример: Ð&rdquo;миÑ&sbquo;рийÐ&rdquo;Ð&micro;вяÑ &sbquo;кин, может как то поможет в решении проблемы.
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
09.08.2018, 07:53
Цитата Сообщение от Soulful Посмотреть сообщение
вот пример: Ð&rdquo...
Похоже на спецсимволы HTML, вот можете посмотреть, например символ &rdquo - правые двойные кавычки:
https://puzzleweb.ru/html/html_symbols.php
К сожалению, лично я, больше ничем помочь не могу, увы...
Я как-то давно сталкивался с подобной проблемой, долго искал решение. Решением оказалось как раз то о чем говорили выше:
• "удаляем маркер BOM" - через нотпад++
• "указываем кодировку страницы в хэдере":
PHP
1
header('Content-Type: text/html; charset=utf-8');
И с того времени, как это не банально, я просто копирую один и тот же файл и в нем пишу код
1
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
09.08.2018, 09:39  [ТС]
zlojnaxa,
Да вы правы, только не пойму как их отключить теперь. Проблема именно в графе кому. Спасибо за помощь, буду дальше тыркаться)

И кстати проблема с отправкой так и осталась: Внимание! Произошла ошибка. - Could not access file: ../upload/5b6be20184365.
Хотя письмо доходит..
0
Эксперт JS
2037 / 1096 / 409
Регистрация: 29.04.2016
Сообщений: 2,625
09.08.2018, 10:06
Цитата Сообщение от Soulful Посмотреть сообщение
Could not access file: ../upload/5b6be20184365
Мои прелположения:
upload - это директория
5b6be20184365 - это, по всей видимости, какой-то файл
Could not access file - перевод: "Не удалось получить доступ к файлу"
Сервер при отправке пытается получить доступ к какому-то файлу, как я это понимаю. Вы, случайно при отправке письма ни какого файла не пытаетесь отправить? Если пытаетесь то стоит, наверное, посмотреть именно в эту сторону.
Посетила меня одна, наверное, глупая мысль, но все же, вдруг прокатит, скачайте архив и проделайте ту же самую процедуру для всех трех файлов: скачать, извлечь, переименовать в свой файлы, заменить свои файлы переименованными. Файлы там немного другие в отличии от тех что я скидывал выше.
Если все останется по-прежнему, увы... это была моя последняя догадка.
Вложения
Тип файла: zip Архив ZIP - WinRAR.zip (8.2 Кб, 1 просмотров)
0
0 / 0 / 0
Регистрация: 06.08.2018
Сообщений: 11
09.08.2018, 15:31  [ТС]
zlojnaxa,
Файл не пытаюсь отправить, отправляю без прикрепленного файла, выдает такую ошибку.
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
BasicMan
Эксперт
29316 / 5623 / 2384
Регистрация: 17.02.2009
Сообщений: 30,364
Блог
09.08.2018, 15:31
Помогаю со студенческими работами здесь

Форма обратной связи
Создал форму обратной связи. Почта приходит, но еще есть надпись X-PHP-Originating-Script: 0:Nadia.php - как ее убрать

Форма обратной связи
Уважаемые, подскажите, использовал следующий код для организации формы обратной связи. Всё успешно отсылается, но письмо приходит без...

Форма обратной связи
Приветствую всех! На сайте предполагается форма - имя - телефон - поле для заказа товара. Поле для заказа по желанию можно добавлять....

Форма обратной связи
Добрый день.Помогите пожалуйста, сообщения не отправляются.

Форма обратной связи
Здравствуйте. Есть форма обратной связи,я получаю важную инфу, как сделать чтобы письма не попадали в спам?


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
17
Ответ Создать тему
Новые блоги и статьи
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования. Часть библиотеки BedvitCOM Использованы. . .
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL3_image
8Observer8 27.01.2026
Содержание блога SDL3_image - это библиотека для загрузки и работы с изображениями. Эта пошаговая инструкция покажет, как загрузить и вывести на экран смартфона картинку с альфа-каналом, то есть с. . .
Влияние грибов на сукцессию
anaschu 26.01.2026
Бифуркационные изменения массы гриба происходят тогда, когда мы уменьшаем массу компоста в 10 раз, а скорость прироста биомассы уменьшаем в три раза. Скорость прироста биомассы может уменьшаться за. . .
Воспроизведение звукового файла с помощью SDL3_mixer при касании экрана Android
8Observer8 26.01.2026
Содержание блога SDL3_mixer - это библиотека я для воспроизведения аудио. В отличие от инструкции по добавлению текста код по проигрыванию звука уже содержится в шаблоне примера. Нужно только. . .
Установка Android SDK, NDK, JDK, CMake и т.д.
8Observer8 25.01.2026
Содержание блога Перейдите по ссылке: https:/ / developer. android. com/ studio и в самом низу страницы кликните по архиву "commandlinetools-win-xxxxxx_latest. zip" Извлеките архив и вы увидите. . .
Вывод текста со шрифтом TTF на Android с помощью библиотеки SDL3_ttf
8Observer8 25.01.2026
Содержание блога Если у вас не установлены Android SDK, NDK, JDK, и т. д. то сделайте это по следующей инструкции: Установка Android SDK, NDK, JDK, CMake и т. д. Сборка примера Скачайте. . .
Использование SDL3-callbacks вместо функции main() на Android, Desktop и WebAssembly
8Observer8 24.01.2026
Содержание блога Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru