When i try to send emails from my phpmailer class, it returns true, but in the Directadmin mail log it logs a TimeOut.
2012-10-21 14:22:14 1TPsca-0000t7-Vj gmail-smtp-in.l.google.com
[2a00:1450:4013:c01::1a] Connection timed out2012-10-21 14:22:14 1TPsca-0000t7-Vj => [Email]
F=<[Email]> R=lookuphost T=remote_smtp S=3286
H=gmail-smtp-in.l.google.com [74.125.136.26] X=TLSv1:RC4-SHA:128
C=”250 2.0.0 OK 1350822120 f43si4569491eem.30″2012-10-21 14:22:14 1TPsca-0000t7-Vj Completed
but the email dont got send.
How can i fix this?
Thanks!
Wouter0100
Connection time-out means the mail server cannot be reached anymore. If the mail server is different from your web server (i.e. not localhost) I’d check with your hosting provider whether they enabled some sort of firewall that blocks connections on the SMTP port
The error that you are receiving means that the connection is failing on this line: SMTP.Connect().
Usually, it means the port is wrong, the server is not up, or you don’t have connectivity.
In this case, you don’t have connectivity, most likely because your ISP is blocking connection to that remote port.
Try sending the email from your hosted web server.
Even if you could connect, your code won’t work as is. Port 465 on Google’s SMTP server requires a secure (SSL) connection. You’ll still need to implement that.
Gmail’s SMTP server requires SSL if I recall correctly.
try this
also
Read support.google.com/mail/bin/answer.py?hl=en&answer=13287 – SSL must be used to use the GMail SMTP server. Quote: “If your client does not support SMTP4 authentication, you won’t be able to send mail through your client using your Gmail address.”