I'm trying to configure Sendmail through XAMPP to send email. In my sendmail.ini I have these settings:
# Set default values for all following accounts.
logfile "C:xamppsendmailsendmail.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
I've created a test script like this:
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,
How are you?";
$headers = "From: [email protected]" . "
";
if (mail($to, $subject, $body, $headers)) {
echo ("Message successfully sent!");
} else {
echo ("Message delivery failed...");
}
I get a message to say that the email was sent but it never arrives and in the logs I get:
sendmail: Error during delivery: Must issue a STARTTLS command first.
Does anybody know what the issue could be here?
Thanks in advance!
Gaz
Question&Answers:os