这有效:
Mail::send('emails.empty',
$invoice, function ($m) use ($invoice) {
$m->from('hello@app.com', 'Your Application');
$m->to($invoice['customer_email'], $invoice['customer_name'])
->subject($invoice['email_subject']);
});
但这不起作用
Mail::later(1, 'emails.empty',
$invoice, function ($m) use ($invoice) {
$m->from('hello@app.com', 'Your Application');
$m->to($invoice['customer_email'], $invoice['customer_name'])
->subject($invoice['email_subject']);
});
同样采用新的5.3方式,它不起作用
$user = new App\User();
$user = $user->find(1);
Mail::to($user)->queue(new EmailTest($user));
这是faild工作错误:
Swift_TransportException: Expected response code 250 but got code "", with message "" in /private_html/dev1/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
Stack trace:
#0 .......................
我使用mailtrap发送/捕获我的电子邮件。使用相同的设置de SEND功能有效!所以它不是设置