Skip to content

kunalm8470/SendGrid_Email_Dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sending Emails using SendGrid Email Service and .NET 5

Twillio SendGrid service allows us to programatically send emails freely by registering.

Post registering follow the instructions to obtain an API key and verify the sender's email address.

To scaffold the app -

mkdir src

cd src
dotnet new console -o SendGridEmailTest

cd ..
dotnet new sln

dotnet sln add .\src\SendGridEmailTest\

To build the app -

dotnet build

To run the app -

cd .\src\SendGridEmailTest\

# Set the below environment variables
$env:SENDGRID_EMAIL_API_KEY="<SENDGRID_EMAIL_API_KEY>"
$env:FROM_EMAIL="<FROM_EMAIL_ADDRESS>"
$env:FROM_EMAIL_FRIENDLY_NAME="<FROM_EMAIL_FRIENDLY_NAME>"
$env:TO_EMAIL="<TO_EMAIL_ADDRESS>"
$env:TO_EMAIL_FRIENDLY_NAME="<TO_EMAIL_FRIENDLY_NAME>"

dotnet run

About

Sending Emails using SendGrid Email Service and .NET 5

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages