How can I use Sendgrid's Web API instead of SMTP relay to send emails? For example the backoffice forgot password email. Is there are process I can override to implement this myself?
I've seen other threads where people ask about this and they are dead ends too. Is there not a solution to this? If that's the case could someone confirm that there isn't a solution to this?
What you suggested did work. I deleted my SMTP Relay key and added a new Web API key in Sendgrid. I then simply added the Web API key as the value for password in the smtp section of my Web.Config.
I hope this helps someone else confused by this because the other threads I found were dead ends.
I still find this really confusing since in the past when I've coded these solutions sending email via SMTP is a bit different than sending email with an API.
Using Sendgrid Web API for email
How can I use Sendgrid's Web API instead of SMTP relay to send emails? For example the backoffice forgot password email. Is there are process I can override to implement this myself?
I've seen other threads where people ask about this and they are dead ends too. Is there not a solution to this? If that's the case could someone confirm that there isn't a solution to this?
Hi Jason,
This is how I've been using SendGrid, with the API key for authentication...
In my Web.config...
The "apikey" username is standard, accordingly to the docs: https://sendgrid.com/docs/for-developers/sending-email/upgrade-your-authentication-method-to-api-keys/
Hope this helps?
Cheers,
- Lee
Hey Lee,
I'll give it a shot. It just threw me off to stick the API keys in the SMTP section. Thanks!
Jason
What you suggested did work. I deleted my SMTP Relay key and added a new Web API key in Sendgrid. I then simply added the Web API key as the value for password in the smtp section of my Web.Config.
I hope this helps someone else confused by this because the other threads I found were dead ends.
I still find this really confusing since in the past when I've coded these solutions sending email via SMTP is a bit different than sending email with an API.
Thanks again Lee!
Hey Jason, good to hear that it's all working for you!
Cheers,
- Lee
is working on a reply...