简体   繁体   English

laravel联机后出现内部邮件错误500

[英]laravel mail internal server error 500 after putting online

my mail worked (and still works) perfectly on my localhost. 我的邮件在我的本地主机上工作正常(并且仍然有效)。 Now ive put my project to a dedicated server. 现在,我把我的项目放在专用服务器上。 And now when i try to mail i get "internal server error 500" and nothing more of detail. 现在,当我尝试发送邮件时,出现“内部服务器错误500”,仅此而已。

I kept the same details, and changed nothing. 我保留了相同的细节,并且什么也没改变。

When i create an error in mail mail template it gives there an error so it really loops trough the mail function. 当我在邮件邮件模板中创建错误时,它给出了一个错误,因此它确实循环通过邮件功能。

some of my settings: 我的一些设置:

'host' => 'smtp.gmail.com',
'port' => 465,
'from' => array('address' => "myemail@gmail.com", 'name' => "my name"),
'encryption' => 'ssl',

etc... now there is 1 setting that i dont know if it has to change: 等等...现在有1个设置,我不知道是否需要更改:

'sendmail' => '/usr/sbin/sendmail -bs',

and in my controller: 在我的控制器中:

      Mail::send('emails.shop', $data, function($message) 
     {
         $message->to("anEmail@gmail.com", 'hi')->subject('Service formulier ');
    });

Someone knows whats wrong? 有人知道怎么了吗? (if needed i can give some more details) (如果需要,我可以提供更多详细信息)

i have a password and username set, but just didnt put it here, and it works on localhost with the password and username 我设置了密码和用户名,但没有在此处输入密码,并且在本地主机上使用了密码和用户名

update: tested with tls and port 587 and didnt work 更新:使用tls和端口587测试,并且没有工作

update2: 更新2:

the logs: [Wed Dec 03 19:24:52 2014] [error] [client 91.181.50.243] FastCGI: comm with server "/var/www/cgi-bin/php5-mywebsite-fcgi" aborted: idle timeout (30 sec), referer: “”mywebsite”” [Wed Dec 03 19:24:52 2014] [error] [client 91.181.50.243] FastCGI: incomplete headers (0 bytes) received from server "/var/www/cgi-bin/php5-mywebsite-fcgi", referer: “”mywebsite”” 日志:[2014年12月3日星期三19:24:52] [错误] [客户端91.181.50.243] FastCGI:服务器“ / var / www / cgi-bin / php5-mywebsite-fcgi”与服务器的通讯异常终止:空闲超时(30秒),引荐网址:““ mywebsite”” [2014年12月3日星期三19:24:52] [错误] [客户端91.181.50.243] FastCGI:从服务器“ / var / www / cgi-bin接收到的标头不完整(0字节) / php5-mywebsite-fcgi”,引荐网址:““ mywebsite””

Have you tried with tls ? 您尝试过tls吗? And also try with port 587 . 并尝试使用端口587 And it looks like you are missing password. 而且您似乎缺少密码。

ok so mail::Send is hanging. 好的,所以mail :: send已挂起。 here is where you are going to need to get the server people involved. 这是您需要让服务器人员参与的地方。 since depending on where it is hosted, etc. A common practice is to block outbound SMTP ports (especially on new/cheap accounts) as a way to mitigate spam problems. 因为这取决于托管位置,所以通常的做法是阻止出站SMTP端口(尤其是在新帐户/便宜帐户上),以缓解垃圾邮件问题。 So I would ask the server hosting people about sending outbound email and see if they have any blocks in place 所以我会问托管人的服务器发送出站电子邮件,看看他们是否有任何阻止

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM