I have been trying to setup sendgrid on SQL Database Mail but all the time it says Cannot send mail to mail server.
This is what i have done.
I have sendgrid accound with firstname.lastname@example.org and created api key and SG.xxxx password.
As this is prod setup instance, i had done domain level authentication and my webmaster updated CNAME as requested by sendgrid.
Tested using TELNET smtp.sendgrid.net 587 and authenticated with SG.xxxx password Base64 encoded and this was able to send email from email@example.com to firstname.lastname@example.org
I setup profile with email@example.com as SQL notification Profile and selected Basic Authentication and provided 'apikey' as username and 'SG.xxx' as password in Database Mail - 'Configure Database Mail' option in SQL SSMS. Unchecked - 'The server requires secure authentication (SSL) connection' Port 587
I tried to 'Send Test Mail' with 'firstname.lastname@example.org' to 'email@example.com' but the Database Mail reflects as below screenshot error
I have tried using firstname.lastname@example.org and sendgrid account password in Database Mail Config wizard for Basic authentication, but sendgrid suggested they don't accept Basic authentication. Please help how and where should i pass the api key if not under Basic Authentication ?
I tried updating with msdb.dbo.sysmail_add_account_sp nad updating records but it too didn't resolve and send email from Database mail.
Any help/ guidance would be greatly appreciated or if you had faced this how have you resolved it.