Вот что, который приходит мне на почту:
- Спойлер
- This is the mail system at host netalkonarko.localdomain.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email protected]>: host mxs.mail.ru[217.69.139.150] said: 550 Message
was not accepted -- it contains invalid headers. More specially, 'From:'
header must match user you are sending mail from. See
http://help.mail.ru/mail-help/mailer/popsmtp for details. (in reply to end
of DATA command)
Reporting-MTA: dns; netalkonarko.localdomain
X-Postfix-Queue-ID: 8F37141452
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Wed, 5 Mar 2014 14:53:54 +0400 (MSK)
Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.0.0
Remote-MTA: dns; mxs.mail.ru
Diagnostic-Code: smtp; 550 Message was not accepted -- it contains invalid
headers. More specially, 'From:' header must match user you are sending
mail from. See http://help.mail.ru/mail-help/mailer/popsmtp for details.
Файл smtp.php
- Спойлер
- $mhSmtpMail_Server = "smtp.gmail.com"; // smtp-сервер
$mhSmtpMail_Port = "465"; // порт smtp
$mhSmtpMail_Username = "[email protected]"; // имя пользователя
$mhSmtpMail_Password = "**********"; // пароль
Файл send.php
- Спойлер
- //require("smtp.php");
header ("Content-Type: text/html; charset=utf-8"); //кодировка
//адрес почты для отправки уведомления
$to = "[email protected]"; //получатель
// не трогать
$HTTP_HOST = parse_url ("http://".$_SERVER["HTTP_HOST"]);
$HTTP_HOST = str_replace (array ("http://","www."), "", $HTTP_HOST["host"]);
$from = "[email protected]".$HTTP_HOST; // отправитель. Если настраиваете smtp, не забудьте указать в $from ваше мыло
Если Вас не затруднит, уделите пожалуйста несколько минут Вашего времени, очень хочется разобраться со скриптом.
Заранее Вам благодарен.