Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 4 使用不带Gmail的Swift Mailer在Laravel中发送电子邮件_Laravel 4_Swiftmailer - Fatal编程技术网

Laravel 4 使用不带Gmail的Swift Mailer在Laravel中发送电子邮件

Laravel 4 使用不带Gmail的Swift Mailer在Laravel中发送电子邮件,laravel-4,swiftmailer,Laravel 4,Swiftmailer,您好,我是laravel的新手,对某些功能仍很熟悉,我想知道如何在不使用gmail smtp设置的情况下从我的laravel应用程序发送电子邮件。就像基本PHP中邮件函数的工作方式一样。这可能吗?我试过用谷歌搜索,但找不到解决方案,他们都使用gmail。转到你的app/config/mail.php 更改驱动程序、主机和源 'driver' => 'mail', 'host' => '', 'from' => array('address' => 'us@example.

您好,我是laravel的新手,对某些功能仍很熟悉,我想知道如何在不使用gmail smtp设置的情况下从我的laravel应用程序发送电子邮件。就像基本PHP中邮件函数的工作方式一样。这可能吗?我试过用谷歌搜索,但找不到解决方案,他们都使用gmail。

转到你的app/config/mail.php 更改驱动程序、主机和源

'driver' => 'mail',
'host' => '',
'from' => array('address' => 'us@example.com', 'name' => 'Laravel'),
或者您可以在中设置“from”

Mail::send('emails.welcome', $data, function($message)
{
    $message->from('us@example.com', 'Laravel');

    $message->to('foo@example.com')->cc('bar@example.com');
});

转到你的app/config/mail.php 更改驱动程序、主机和源

'driver' => 'mail',
'host' => '',
'from' => array('address' => 'us@example.com', 'name' => 'Laravel'),
或者您可以在中设置“from”

Mail::send('emails.welcome', $data, function($message)
{
    $message->from('us@example.com', 'Laravel');

    $message->to('foo@example.com')->cc('bar@example.com');
});

当我用这种方式尝试时,没有更多的错误,这有什么原因吗?为什么sendgrid和mailgun不起作用?还是因为我正在使用我的本地主机?当我尝试这种方式时,没有更多的错误,这是有原因的吗?为什么sendgrid和mailgun不起作用?还是因为我在使用本地主机?