Question

Unable to send notification by mail via SMTP on DigitalOcean droplet

Posted June 25, 2019 1.8k views
PHP Email DigitalOcean 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.

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.

1 answer

Hello,

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!

Regards,
Bobby

  • 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!
      Bobby

Submit an Answer