Socket Error # 10054 sendmail xammp windows 7

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Socket Error # 10054 sendmail xammp windows 7

Postby Valerio » 21. September 2016 10:50

hello
I am running Xampp control panel V3.2.1 on Windows 7. My aim I to send email from php using sendmail. I spend many hours in tests using different smtp gmail port( 25, 587 and finally 465) and different setup.This is the best result I had:
16/09/20 16:55:25 ** --- MESSAGE BEGIN ---
16/09/20 16:55:25 ** To: xxxx@yyyy.com
16/09/20 16:55:25 ** Subject: Hi!
16/09/20 16:55:25 ** From: gmailaccount@gmail.com
16/09/20 16:55:25 **
16/09/20 16:55:25 ** Hi,
16/09/20 16:55:25 **
16/09/20 16:55:25 ** How are you?
16/09/20 16:55:25 ** --- MESSAGE END ---
16/09/20 16:55:25 ** Connecting to smtp.gmail.com:465
16/09/20 16:55:26 ** Disconnected.
16/09/20 16:55:26 ** Disconnected.
16/09/20 16:55:26 ** Disconnected.
16/09/20 16:55:26 ** Socket Error # 10054<EOL>Connection reset by peer.
Php.ini
[mail function]
SMTP = smtp.gmail.com
smtp_port = 465
sendmail_from =gmaiaccount@gmail.com
sendmail_path="\"C:\xampp\sendmail\sendmail.exe\" -t"

Sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=ssl
error_logfile=error.log
debug_logfile=debug.log
auth_username=gmailaccount@gmail.com
auth_password=******
force_sender=gmailaccount@gmail.com
hostname=localhost




sendmail.php


$to = "xxxx@yyyy.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: gmailaccoun@gmail.com" . "\r\n";
if (mail($to, $subject, $body, $headers)) {
echo ("Message successfully sent!");
} else {
echo ("Message delivery failed...");
}
Any help will be very appreciated.
Valerio
 
Posts: 1
Joined: 20. September 2016 16:47
XAMPP version: Xammp control panel V3.2.1
Operating System: Windows 7

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests