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:\xampp\sendmail\sendmail.log
account Gmail
tls on
port 587
tls_certcheck off
host smtp.gmail.com
from myemail@gmail.com
auth on
user myemail06@gmail.com
password mypassword
account default : Gmail
I've created a test script like this:
$to = "testemail@btinternet.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: myemail06@gmail.com" . "\r\n";
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



sendmail-- world's most famous mail transfer agent (info at Wiki), started in 1979, while most of the answers are about fakesendmail(homepage) -- a fake program used in development server packs, like XAMPP, started 2004. Can't you people see, that configuration file example given by OP is so different from the configuration examples you give back in your answers? Strange.