简体   繁体   English

如何在laravel 5(没有Swiftmailer)中发送电子邮件?

[英]How to send E-mail in laravel 5 (without Swiftmailer)?

I'm getting the Swift_TransportException error connecting to tcp://send.one.com:465 (timed out).我在连接到tcp://send.one.com:465 (超时)时遇到Swift_TransportException错误。 I tried on other Hosting server it is working.我在其他托管服务器上尝试过它正在工作。

I need help to resolve this issue with timing out, or sending mail other ways (other than Swift Mailer, which is not supported on my server).我需要通过超时或以其他方式发送邮件(Swift Mailer 除外,我的服务器不支持)来解决此问题。

Laravel has a great write-up on using some other mail drivers that are offered / supported, and tuts+ has a good guide on implementing this information. Laravel有一个伟大的写了有关使用被提供/支持一些其它的邮件驱动程序,TUTS +具有很好的指导上实现此信息。

The first step from this, would be your modifications to the mail configuration file for Laravel which will be the driver, and sendmail settings sort of like so:第一步,将是您修改 Laravel 的邮件配置文件,它将成为驱动程序,sendmail 设置类似于这样:

'driver' => env('MAIL_DRIVER', 'sendmail'),
'sendmail' => '/usr/sbin/sendmail -bs',

From reading those and tweaking those settings you can avoid Swift Mailer and get some emails out.通过阅读和调整这些设置,您可以避免使用 Swift Mailer 并发送一些电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM