dongqin1861 2016-06-04 16:21
浏览 25
已采纳

在laravel上配置邮件

i want config mail on laravel 5.2, i have a hosting mail with hostinger.com.

how i can configure mail parameters on laravel??

i put this on the .env file:

MAIL_DRIVER=smtp
MAIL_HOST=mx1.hostinger.co
MAIL_PORT=2525
MAIL_USERNAME=reset-password@litraen.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=null

but when i try send email, show this error:

Swift_TransportException in AuthHandler.php line 181:

Failed to authenticate on SMTP server with username "reset-password@litraen.com" using 2 possible authenticators

thanks.

  • 写回答

1条回答 默认 最新

  • douhao5280 2016-06-04 17:10
    关注

    Try to set MAIL_PORT=25 in your settings.
    (In case it is not a mistake)

    Also check if the port 25 of your system is not already taken or closed.

    If your mail configuration uses SSL, you might use:
    MAIL_PORT=465

    This read also might help.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?