问题描述
当前,我有一个网站与表单联系,可以使用其他帐户电子邮件向我发送电子邮件,
我正在使用Office 365和PHPmailer来处理它,但是如果在我的代码中实施,则会出现一些错误。
错误:
2020-10-23 08:40:52 CLIENT -> SERVER: EHLO localhost
2020-10-23 08:40:52 CLIENT -> SERVER: STARTTLS
2020-10-23 08:40:52 CLIENT -> SERVER: EHLO localhost
2020-10-23 08:40:52 CLIENT -> SERVER: AUTH LOGIN
2020-10-23 08:40:52 CLIENT -> SERVER: aW5mb0BvYmYxxxx
2020-10-23 08:40:52 CLIENT -> SERVER: Z3R2Z3hneW55d2xxxxxxxx 2
020-10-23 08:40:58 SMTP ERROR: Password command Failed: 535 5.7.3 Authentication unsuccessful [SG2PR06CA0187.apcprd06.prod.outlook.com]
2020-10-23 08:40:58 SMTP Error: Could not authenticate.
2020-10-23 08:40:58 CLIENT -> SERVER: QUIT
2020-10-23 08:40:58 SMTP Error: Could not authenticate.
我的代码:
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'STARTTLS';
$mail->Host = 'smtp.office365.com';
$mail->Port = 587;
$mail->Username = '[email protected]';
$mail->Password = 'password';
$mail->Subject = $subject;
有人可以帮助我在PHPmailer中使用Office 365吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)