Reputation: 5634
In php.ini I set:
SMTP = smtp.gmail.com
smtp_port = 465
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]
In my sendmail.ini:
smtp_server=smtp.gmail.com
smtp_ssl=ssl
[email protected]
auth_password=mygmail password
In my error log:
13/05/18 23:33:30 : Socket Error # 10060<EOL>Connection timed out.
The email actually sent twice, but 99% of the time, I get the same error as above. I disabled my router's SPI, and my computer's firewall. Any ideas?
Upvotes: 1
Views: 13080
Reputation: 820
Most local boxes with Windows don't come with a SMTP server. You could use an external SMTP server and configure it in your php.ini
file, but SMTP authentication is not possible.
I recommend you to use PHPMailer, is a simple and flexible PHP Class, that can use a SMTP server with authentication. It is also more secure than using bundled PHP mail()
function.
http://phpmailer.worxware.com/
Upvotes: 4