Mail::假装()只记录一个sending mail是假的。开发期间是否可以将呈现的电子邮件的输出转储到文件或日志中?
发布于 2013-09-28 09:39:16
我已经开始使用的一个很好的选项是https://papercut.codeplex.com/
您将smtp设置设置为路由到这个简单的程序&它拦截类似Outlook的应用程序中的电子邮件,就像邮件真的发送出去一样
发布于 2013-09-28 09:01:29
如果将呈现的视图缓存在变量中,则可以这样做,如
$renderedView = View::make('email.index', $data); // email(folder)/index(file);
// Now you can dump the output ($renderedView) to a file
File::put('path/to/file', $renderedView)
$data['content'] = $renderedView;
Mail::send('emails.welcome', $data, function($message)
{
// code here
});https://stackoverflow.com/questions/19063599
复制相似问题