Sendgrid as SMTP service

I am not able to get the sendgrid SMTP service running. I have tried using the SMTP service using Flask-mail app and it works. But from Mastodon it won’t work. Here are the settings.

SMTP_SERVER=smtp.sendgrid.net
SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_AUTH_METHOD=plain
SMTP_OPENSSL_VERIFY_MODE=none
SMTP_FROM_ADDRESS=notifications@masto.com
SMTP_TLS=1

What should I change to get it working?

You need

 SMTP_LOGIN=apikey

(literally apikey) and SMTP_PASSWORD will be your API key value.

I would also remove SMTP_OPENSSL_VERIFY_MODE=none
once you get it working

Initially, the password that I setup was wrong. And when the server was running I changed the .env.production with the correct password and restarted all services. It still didn’t work. But when I created a new instance and filled up all the correct details in setup it worked just fine. Restarting the services did not work. I don’t know why.