Unable to send notification by mail via SMTP on DigitalOcean droplet

Posted June 25, 2019 4k views
PHPEmailDigitalOceanUbuntu 18.04

I’m using Laravel 5.8 and I sending emails via Laravel notifications. I can send email from localhost, but I am unable to do that from DigitalOcean droplet.

My DNS records:

Actual exception:

cache:clear did not nothing.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Seems like you are using incorect SMTP login details and your Laravel application is failing to authenticate. You need to make sure that you add the correct SMTP login details in your .env file.

At the moment I can see that you are using ’’ as username.

Hope that this helps!


  • Hello, like as I said it’s working on localhost, this way account info is correct. is edited by me.

    • Hi,

      Thanks for the clarification.

      What I could suggest in this case is to try to set the Allow less secure apps to ON for this Gmail account.

      1 login to google using the same account
      2 go to the security page
      3 set the Allow less secure apps to be ON
      4 then try sending another email

      Let us know how it goes!