How to Send Email Using SendGrid SMTP
Technical

How to Send Email Using SendGrid SMTP

RK
Ramesh KannanSenior .NET Full Stack Developer
#sendgrid#SendGrid SMTP#SMTP#SendGrid SMTP integration#SendGrid SMTP server

Originally published on arasu-rrk.com.

SendGrid (now owned by Twilio) is used by some of the biggest names in the industry such as Uber, Spotify, Yelp, Airbnb, and Kinsta. It originally started as a transactional email SMTP and API service designed for developers. They also offer email marketing features.

  1. Go to https://app.sendgrid.com/settings/api_keys

  2. Click Create API Key.

  3. From the dialog select Restricted Access.

  4. Enable the option Mail Send → Mail Send.

  5. Once the API key is generated, keep it in a safe place. You cannot retrieve the same key again — you would need to regenerate a new one.

  6. Use the following SMTP configuration in your application:

Field Value
Host smtp.sendgrid.net
Port 587 or 465 (SSL)
Username apikey (Yes, apikey is the username for all accounts)
Password API key generated in the above steps

Code Samples

SendGrid Documentation