[英]issue in sending email using outlook smtp with phpmailer class
我正在嘗試使用phpmailer類從Outlook smtp發送電子郵件。 我收到以下錯誤。
2017-07-18 09:19:33 Connection: opening to ssl://smtp.office365.com:587, timeout=300, options=array ( 'ssl' => array ('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),
)
2017-07-18 09:19:34 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol [/var/www/html/application/third_party/phpmailer/class.smtp.php line 294]
2017-07-18 09:19:34 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/var/www/html/application/third_party/phpmailer/class.smtp.php line 294]
2017-07-18 09:19:34 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) [/var/www/html/application/third_party/phpmailer/class.smtp.php line 294]
2017-07-18 09:19:34 SMTP ERROR: Failed to connect to server: (0)
2017-07-18 09:19:34 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
有人可以幫我嗎???
在花費您撰寫此問題的時間中,您可能已經單擊了錯誤消息中包含的鏈接,該鏈接會帶您進入一個頁面,告訴您如何解決此確切錯誤。
您不能將SMTPSecure = 'ssl'
與Port = 587
; 設置SMTPSecure = 'tls'
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.