首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法从godaddy主机上的Laravel 4发送邮件

无法从godaddy主机上的Laravel 4发送邮件
EN

Stack Overflow用户
提问于 2015-07-24 03:00:36
回答 1查看 951关注 0票数 2

我正在使用下面的代码通过Laravel 4发送电子邮件。

Mail::send('emails.welcome', array('data' => 'This is a test content' ), function($message)
{
    $message->to('mymail@site.com', 'TomTom')->subject('Welcome to Laravel!');
});

每当我尝试发送电子邮件时,都会抛出以下错误:

A connection could not be established with the host 
smtpout.asia.secureserver.net [Connection refused #111]

但是当我使用的php mail函数发送电子邮件时,它工作得很好!

var_dump(mail("mymail@site.com", "subject", "hello world"));

那么问题出在哪里呢?

EN

回答 1

Stack Overflow用户

发布于 2015-11-24 04:44:22

您可以尝试其他端口:

return array(    
    'driver' => 'smtp',
    'host' => 'ailstore1.asia.secureserver.net',
    'port' => 465,
    'from' => array('address' => 'mail@mysite.in', 'name' => 'name'),
    'encryption' => 'ssl',   
    'username' => '',    
    'password' => '',
    'sendmail' => '/usr/sbin/sendmail -bs',
    'pretend' => false
);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31595944

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档