当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Phpmailer gmail SMTP connect() failed

问题描述:

I'm trying to get PHPMailer work but keep getting SMTP connect() failed error.

I end up just using the gmail example provided in the github repository but still doesn't work.

I've set SMTPDebug to 4 and here's error message:

Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()

SMTP ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Things I've tried but didn't work:

both IIS and WAMP on my local

set open_ssl to enable

分享给朋友:
您可能感兴趣的文章:
随机阅读: