Send email from Azure SendGrid using PowerShell
Abs07act
Sendgrid is popular. No doubt about it! Especially for
Dev and Test scenarios where you get 25000 free emails a month. This post
describes how can you use Sendgrid to send email using PowerShell.
Don’t expect me to write blog post on C# code for
sending email using Sendgrid. Because, Sendgrid will keep updating their API
(like V2, V3 and so on); ultimately C# code will also change. So you can refer C# or other languages code sample from SendGrid documentation itself.
Let’s create a SendGrid account quickly on Azure. Login
to Azure portal on the link –
http://portal.azure.com
. Sendgrid
today available only in selected region. Example, not available in India
region. I am based out of India so nearest data center for me is SouthEast Asia
referred as SEA in the blog). I will select the SEA datacenter for the creation
of SendGrid account on Azure. Therefore first let’s add Resource group in SEA
region and then create SendGrid in the same Resource group.
Select “Resource Groups” in left had pane. It lists all
resource groups present in your subscription. Click on “Add” button present at
the top. Provide the resource group name as SendEmailRG, subscription of your
choice and location as SEA as shown below. Click on Create to finish the
resource group creation process.
Click on New.
You will see a search box at the top. Type Sendgrid on the search box;
intelligence will automatically display “Sendgrid Email Deliverys”. Select the
same and press enter. Another horizontal blade will open. Select the Sendgrid
Email Delivery option and click on Create.
Provide the name of account as “EmailSample”. Provide
the password of your choice and remember it. We will need it later. Select the
Azure subscription and select existing option for resource group. Select
SendEmailRG resource group. This step will ensure that SendGrid account in
created in SEA region.
On pricing tier; select the option as Free as shown
below –
If you have money feel free to select the other paid pricing
tiers.
Provide the contact information. I have provided below.
Remember you will receive confirmation email from SendGrid. So don’t put values
like below; rather give genuine values.
Select “I give…” checkmark for legal terms and click on
Purchase. Then proceed ahead and finish the SendGrid account creation process.
Comments
Post a Comment