0
我刚刚开发了一个带有邮件系统的laravel web应用程序。 我有错误,如Lravel邮件不发送 - 无法建立与主机smtp.gmail.com的连接[连接超时#110]
Connection could not be established with host smtp.gmail.com [Connection timed out #110]
控制器
Mail::send('timesheet/emailtemplate',array('data'=>$query),function($message)
{
$message->to('[email protected]')->cc('[email protected]')->subject('Work Report on - ');
});
电子邮件模板文件:emailtemplate.blade.php
<h2>hai</h2>
mail.php(配置)
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 587,
'from' => array('address' => null, 'name' => null),
'encryption' => 'ssl',
'username' => '[email protected]',
'password' => 'mypassword',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
Thnks很多猪头... – Jishad 2015-02-06 04:57:38
如何通过mail100.us4.mandrillapp.com **在邮件中删除** – Jishad 2015-02-06 04:58:35
app/config/mail.php ''from'=> array('address'=>'[email protected]', 'name'=>'webAdmin'),' 改变这一行:) – Alupotha 2015-02-06 05:30:44