SMTP Config with SendGrid..Again
-
Hi,
I'm desperately trying to migrate to FusionAuth, but having a nightmare integrating with SendGrid and getting the same error as the thread above.
Compounding the situation is that despite debug setting enabled in advanced settings, nothing gets written to the app.log apart from the node start/restart messages. No messages about emails test sending.
I also tried changing the SMTP host to a local instance, still getting the same error message, and nothing written to the log.
What is my installation missing? Has anyone managed to set up email settings with SendGrid and how did you resolve your issues and what were your challenges?
Without the email functioning, I can't move to FusionAuth, and I must add it looks impressive and installation was pretty straight forward and the architecture to scale is well thought out and very promising.
Am attaching some screenshots of my settings and error message.
Thanks for taking time off your busy schedule to read my issue. I greatly appreciate it and hope you can help me get onto this awesome project
B Kabs
-
Hi @boniface
Sorry to hear that you are having trouble. I have a couple of things to suggest:
- Have you reviewed the SendGrid documentation to make sure that you have set up your account on that end correctly?
- Have you tried setting up a local server (such as mailcatcher) to confirm that you are able to send and receive emails locally?
- Can you confirm that you are using
apikey
for the user name when sending with SendGrid? - We have a bit of troubleshooting that you can review (looks like you may have already) -> https://fusionauth.io/docs/v1/tech/admin-guide/troubleshooting/#troubleshooting-email
- Have you tried using http://www.jetmore.org/john/code/swaks/ for troubleshooting? This will remove FusionAuth completely from the process and confirm that your access to SendGrid is functional.
The command that worked for me was:
~/Downloads/swaks-20201014.0/swaks --to my_email@my_domain.io --from me@example.com --auth-user apikey --header-X-Test "test email" --server smtp.sendgrid.net --port <send_grid_port_standard>
- There are a few other suggestions here
https://docs.sendgrid.com/for-developers/sending-email/getting-started-smtp#:~:text=with the API.-,What is SMTP%3F,scale for your SMTP needs.
Hope this helps!
-
@boniface we're using FA with SendGrid in our DEV environment.
We are using the SMTP server mode.
You will need to:
-
Add you host and username from instructions in sendgrid. It is smtp.sendgrid.net and apikey for everyone
-
Add the password from your instance under that Change Password flipper button in FA
-
Make sure your default from address is registered in SendGrid as an actual domain and address that you can send from - I believe this is necessary for all SendGrid email, otherwise you could use them for SPAM
That's all we did and it worked for us.
Note since this is DEV, we are not using TLS or SSL security. But we will in QA and Production
-
-
Finally got it to work. Thanks, @joshua & @fred-fred . Turns out the credentials to SendGrid were wrong. I reckon the error message sent me off the scent. I thought it was to do with the system rather than the response from the external system because changing SMTPs was giving me same error message.
It is working now and thanks for the help