Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用Swiftmailer和Office 365发送邮件再次失败_Php_Symfony_Office365_Swiftmailer - Fatal编程技术网

Php 使用Swiftmailer和Office 365发送邮件再次失败

Php 使用Swiftmailer和Office 365发送邮件再次失败,php,symfony,office365,swiftmailer,Php,Symfony,Office365,Swiftmailer,试图通过Office365在Swiftmailer 5.x中发送电子邮件 这在相当长的一段时间内一直稳定运行: mailer_transport: smtp mailer_host: smtp.office365.com mailer_port: 587 mailer_user: me@mydomain.com mailer_password: mypassword mailer_encryption: tls 在我最近找到的任何答案/文章中,仍然是建议的解决方案,但是 这将导致: 未捕获的P

试图通过Office365在Swiftmailer 5.x中发送电子邮件

这在相当长的一段时间内一直稳定运行:

mailer_transport: smtp
mailer_host: smtp.office365.com
mailer_port: 587
mailer_user: me@mydomain.com
mailer_password: mypassword
mailer_encryption: tls
在我最近找到的任何答案/文章中,仍然是建议的解决方案,但是

这将导致:

未捕获的PHP异常Swift_TransportException:“无法使用用户名在SMTP服务器上进行身份验证”me@mydomain.com“使用1个可能的验证器”位于…/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php第181行


当然,我检查了用户名/密码是否正确,并且我可以用其他方式使用这些凭据发送邮件。

您检查过地址了吗

$message = \Swift_Message::newInstance()
                ->setSubject('Subject')
                ->setFrom('me@mydomain.com')

你查过我的地址了吗

$message = \Swift_Message::newInstance()
                ->setSubject('Subject')
                ->setFrom('me@mydomain.com')
你读过吗?有人有同样的问题,但没有回答,也许你可以从他们那里得到帮助。你读过吗?有人有同样的问题,但没有回答,也许你可以从他们那里得到帮助