简体   繁体   English

服务器/ Laravel 5.1-邮件存储?

[英]Server/Laravel 5.1 - Mail storage?

So I developed an application with laravel and everything is running fine. 因此,我使用laravel开发了一个应用程序,一切运行正常。 I had mail as my mail driver but my server was misconfigured, or let's say, postfix was not installed. 我使用邮件作为邮件驱动程序,但是服务器配置错误,或者说未安装后缀。 So the mail a user sent via contact form in my laravel app never got sent. 因此,用户通过我的laravel应用中的联系表发送的邮件从未发送过。 Laravel never complained so I didn't even see any errors in the logs. Laravel从来没有抱怨过,所以我什至没有在日志中看到任何错误。

My question is: Did laravel or my server save the mail it tried to send anywhere so I could see what the user tried to send me? 我的问题是:laravel或我的服务器是否将尝试发送的邮件保存到任何地方,以便我可以看到用户尝试向我发送的邮件?

Unless you've somehow manually added mail logging, this won't be logged for you to send later. 除非您以某种方式手动添加了邮件日志记录,否则此日志将不会记录下来供您以后发送。

Laravel's Mail functionality does include a Log driver , so that mail writes to a log- but this does not work in tandem with the other drivers, so you likely have zero logs currently. Laravel的Mail功能确实包含Log驱动程序 ,因此邮件可以写入日志 ,但这不能与其他驱动程序协同工作,因此您当前的日志可能为零。

http://laravel.com/docs/5.1/mail#mail-and-local-development http://laravel.com/docs/5.1/mail#mail-and-local-development

There are also several results in google on how to implement global logging for all mail sent, maybe check out this or look into laravel events. 也有一些导致谷歌在如何实现发送的所有邮件全局日志,也许看看或可考虑laravel事件。

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

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