ubuntu Server Email Not Sent Laravel (SquirrelMail)

时间:2018-02-16 07:35:03

标签: php laravel email server ubuntu-server

Hello There I have checked all the similar questions but non of the question solved my problem.

My Project is developed on Laravel

My Problem is, When I uploaded my project on Ubuntu serve, I found that Mail is not sent.

When I tested mail on my local computer. It worked perfectly. I tested with mailtrap and gmail. Both worked perfectly.

When I upload on serve, There was an error on sending email. I tested with squirrel mail and gmail. Both method got failed.

When I used gmail the error was Swift_TransportExceptionConnection could not be established with host smtp.gmail.com [Connection timed out #110] and there was no error code on squirrel mail.

My laravel configuration is

MAIL_DRIVER=sendmail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=ssl

1 个答案:

答案 0 :(得分:0)

看起来您可能有一个被阻止的端口,您可能想要禁用防火墙以查看是否有任何更改。否则,请使用正确的IP地址进行dubblecheck。

您可以尝试暂时禁用iptables:

sudo service ufw stop

要重新开始使用:

sudo service ufw start