在Yii 1.1项目中使用PHP Mailer扩展名发送电子邮件时,出现以下错误消息。错误消息如下,
PHP Error[2]: fputs(): SSL: Connection reset by peer
in file /data/www/project/protected/extensions/phpmailer/class.smtp.php at line 543
#0 /data/www/project/protected/extensions/phpmailer/class.smtp.php(543): fputs()
#1 /data/www/project/protected/extensions/phpmailer/class.phpmailer.php(710): SMTP->Mail()
#2 /data/www/project/protected/extensions/phpmailer/class.phpmailer.php(577): JPhpMailer->SmtpSend()
#3 /data/www/project/protected/components/HffMailer.php(206): JPhpMailer->Send()
#4 /data/www/project/protected/models/Recourse.php(549): HffMailer->SendWithOutDbConfirmation()
#5 /data/www/project/protected/commands/SchedulerCommand.php(60): Recourse->autoMailforFundRecourseConfirm()
#6 /data/www/framework/console/CConsoleCommandRunner.php(71): SchedulerCommand->run()
#7 /data/www/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /data/www/framework/base/CApplication.php(180): CConsoleApplication->processRequest()
#9 /data/www/project/protected/yiicmd.php(12): CConsoleApplication->run()
对于某些收件人,已发送电子邮件。但是,在某些情况下,我仍然收到错误消息,但不知道会发生什么情况。
我也有以下错误,
它有SMTP_MAIL_AUTH set to TRUE
和SMTP_MAIL_SECURE = 'tls'
SMTP邮件服务器为smtp.office365.com
SMTP邮件端口为587