Unable to send notification by mail via SMTP on DigitalOcean droplet

June 25, 2019 1.2k views
PHP DigitalOcean Email Ubuntu 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: http://prntscr.com/o6jrrq

Actual exception: https://hastebin.com/gaqudoguxe.cpp

cache:clear did not nothing.

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 'mymail@gmail.com' as username.

Hope that this helps!


  • Hello, like as I said it's working on localhost, this way account info is correct. email@gmail.com 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!

Have another answer? Share your knowledge.