Я пытаюсь настроить Sendmail через XAMPP для отправки электронной почты. В моем sendmail.ini у меня есть следующие настройки:
# Set default values for all following accounts.
logfile "C:\xampp\sendmail\sendmail.log
account Gmail
tls on
port 587
tls_certcheck off
host smtp.gmail.com
from [email protected]
auth on
user [email protected]
password mypassword
account default : Gmail
Я создал тест script следующим образом:
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: [email protected]" . "\r\n";
if (mail($to, $subject, $body, $headers)) {
echo ("Message successfully sent!");
} else {
echo ("Message delivery failed...");
}
Я получаю сообщение, чтобы сказать, что письмо было отправлено, но оно никогда не приходит и в журналах, которые я получаю:
sendmail: Ошибка при доставке: сначала необходимо выполнить команду STARTTLS.
Кто-нибудь знает, что может быть здесь?
Спасибо заранее!
Газ