Cakephp电子邮件连接Office 365
我在使用CakePhp和Office365 SMTP服务器发送电子邮件时遇到问题 我在cakephp中的配置看起来非常简单Cakephp电子邮件连接Office 365,cakephp,office365,Cakephp,Office365,我在使用CakePhp和Office365 SMTP服务器发送电子邮件时遇到问题 我在cakephp中的配置看起来非常简单 'EmailTransport' => [ 'default' => [ 'className' => 'Smtp', // The following keys are used in SMTP transports 'host' => 'smtp.office
'EmailTransport' => [
'default' => [
'className' => 'Smtp',
// The following keys are used in SMTP transports
'host' => 'smtp.office365.com',
'port' => 587,
'timeout' => 30,
'username' => 'email',
'password' => 'pass',
'client' => null,
'tls' => true,
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
],
],
我收到以下错误消息:
连接超时
Cake\Network\Exception\SocketException
Office365的设置在这里
我尝试过将超时设置为60秒、端口25和tls://前缀,但都是相同的错误
Thx这在我看来像是防火墙问题。谢谢Thx的帮助,但问题已经解决了。我使用了类名->Smtp。。。如果我使用“'className'=>'Mail'”则有效…@JohnWayne-wow-man,我已经阅读了几十个答案,尝试了TLS、SSL的所有可能组合,并向托管服务发出了通知单。在cake 2.5中,我决定将
'transport'=>'Smtp'
更改为'transport'=>'Mail'
,并且成功了!。这是我最后一次搜索尝试:“cakephp 2.5 outlook”,而不是搜索特定错误。谢谢