Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

Send, receive, and process emails within the Azure cloud

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

This article is the hands-on step-by-step tutorial for a developer or administrator to send and receive emails using various programming languages within various cloud services).

Why

Because emails are unique to individuals, they are often used as user names to log into websites.

To test services that send and receive emails in production.


Cloud email services

AWS has an email service called Simple Email Service (SES).

Azure administrators can consider integrating with these email services to work with Azure:


Azure Communication Service (ACS)

This service offered by Microsoft was in preview as of 2021-11-25.

  1. At the marketing page, says “Build multichannel communication experiences for video, voice, chat, and SMS on any device, with GitHub and Visual Studio tools”.

    https://azure.microsoft.com/en-us/products/communication-services

    https://learn.microsoft.com/en-us/azure/communication-services/overview

  2. At the pricing page, select a region. Notice that the first 5,000 emails are free.

    https://azure.microsoft.com/en-us/pricing/details/communication-services/

    Notice the components to pricing:

    • $250 per million emails sent (1,000,000 emails * $0.00025)
    • $24 per MB of data sent (1,000,000 emails * 0.2 MB * $0.00012)

    Send an email using Try in the GUI, as described by this Quickstart for Azure CLI, C#, JavaScript, Java, Python, PowerPlatform

    https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/create-email-communication-resource

  3. Click “+ Create”.
  4. Search for Azure service “Email” and select “Email Communication Services”

    https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Communication%2FEmailServices

  5. Click “+ Create” for Basics page.
  6. Select a Subscription.
  7. For Resource group, click “Create new”, then type a name with no spaces.

    PROTIP: If different people/departments administer resources in your company, construct a name that include a way to differentiate them, such as “test” or “prod”, and date created:

    ACS-west-us-test-231125a

    PROTIP: Although the service operates globally across Azure regions, Region is needed in the name for “Resource group location”.

    Include Country code such as “US” in the name due to data sovereignty laws.

    PROTIP: Include the date created in the name so you can sort by name to see the most recent, for Tag cleanup during Azure Spring Clean (in March), etc.

  8. For “Resource group location”, select the Region you typed in the name.
  9. For Instance Details Name, type the same name as the Resource created above.

    REMEMBER: Azure resource names cannot be changed after creation.

    PROTIP: Add a hidden-title Tag for (undocumented/hidden) “friendly name” which can be changed after creation, to make it easier to find in the Azure Portal. visible in JSON views.

  10. Click “Next” to specify Tags associated for cost and activity tracking by Project, Country, etc.

    PROTIP: Add a “CreatedBy” Tag with your name so you can be EASILY contacted if there’s a problem.

  11. Click “Review + create”, “Create” for the Deployment page.
  12. Click “Operation details” for the Resource just created.

    Notice the default Duration is “1 minute 5 seconds”.

  13. Click the Resource Name for its “Email Communication Service” page.

    https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp

    Notice the “Overview” page has a “Try it” button.

SendGrid via Twilio

Based on these references:

  • SendGrid service.
  • https://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021
  • https://docs.sendgrid.com/for-developers/partners/microsoft-azure

  1. Login within an Admin email to the Azure portal at https://portal.azure.com

    If you wish to have a separate email billing from Twilio:

  2. Navigate to Azure Subscriptions if you wish to have a separate billing.

    https://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBladeV1

  3. Click “Add” for a new separate Azure Subscription. Click “All other offers”.

  4. Click “Select offer” under “Pay-A-You-Go”.
  5. Authenticate with your Password.
  6. At the Agreement page, Click “Next”.
  7. Verify Payment Information
  8. PROTIP: I recommend you select “No technical support”. Click “Sign up”.
  9. Wait for “Getting started with Azure”. WARNING: Links here send you to different courses than the ones listed below:
    • Introduction to Azure solutions - 26 min to Learn how Azure enables you to empower employees, engage customers, optimize operations, and transform products.
    • Describe core Azure architectural components - 34 min to Examine the various concepts, resources, and terminology that are necessary to work with Azure architecture.
    • Explore Azure compute services - 52 min to Learn how to take advantage of several virtualization services in Azure compute, which can help your applications scale out.
    • Plan and manage your Azure costs - 1 hr 2 min to Learn how to plan and manage your Azure costs, including cost analysis, cost management, and cost optimization.
    • Introduction to Azure fundamentals - 43 min to Learn about the basics of cloud computing and Azure, and how to get started with Azure’s subscriptions and accounts.

  10. Again, Navigate to Azure Subscriptions if you wish to have a separate billing.

    https://portal.azure.com/?quickstart=True#view/Microsoft_Azure_Billing/SubscriptionsBladeV1

  11. Select the Subscription you just created. It has “Not available” for Current cost.
  12. Rename the Subscription to “Twilio SendGrid” by clicking on the name. Click “Save”.
  13. If you have multiple Azure Active Directory tenants, be sure you are viewing the tenant your subscription is assigned to. You can select Switch directories to view your additional tenants. For more on Azure AD, see “Associate or add an Azure subscription to your Azure Active Directory tenant.”

    Create a SendGrid resource

    https://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021#create-a-twilio-sendgrid-account

  14. Get to “Marketplace”.

    https://portal.azure.com/#view/Microsoft_Azure_Marketplace/MarketplaceOffersBlade/selectedMenuItemId/home

  15. Type “Twilio SendGrid” in the “Search the Marketplace” box.
  16. Click on “Subscribe” in the “Twilio SendGrid” box to select “Free 100 (2022)”.
  17. For Subscription, select
  18. For Resource group, click “Create new”, then type a name with no spaces.

    PROTIP: If several Twilio accounts will be created in your company, administered by different people/departments, include a way to differentiate them:

    • TwilioSendGridTestX231230a
    • TwilioSendGridProdX231230a

    PROTIP: “X” in the name means “eXpiration”. Calculate the date one month from today’s date. For example, if today is 2021-11-30, then the expiration date is 2021-12-30.

  19. For Resource group location, select yours (such as “East US”).
  20. For Saas Details Name, type the same name as created above.

  21. IMPORTANT: For Recurring billing, click “Off”. The account can be made recurring later.

    PROTIP: Set a calendar reminder to cancel this subscription before the end of the month.

  22. Click “Review + subscribe”.

    Configure on Twilio.com

  23. Click “Configure account now”. Authenticate the email to use. Accept.
  24. “Tell Us About Yourself” page at

    https://signup.sendgrid.com/account_details?s2s=true

  25. SECURITY PROTIP: Use a different email than the one you used to login to Azure Portal. But The email address is used to log into Twilio.com, so it needs to be a valid email address.

    dontcontact@mycompany.com

    NOTE: Twilio Sendgrid Support is available at

    https://support.sendgrid.com/hc/en-us/requests/new/submit

    Twitter/X DM @SendGridSupport

    NOTE: Phone support is available for paying (Pro and Premier) customers. If you are a Pro or Premier customer, you can find the phone number for your region in the Support section of your SendGrid account.

  26. Provide a fake Phone Number so you don’t get calls.

    555-555-5555

  27. Click “Get Started!”

    https://www.twilio.com/console

  28. In the Welcome page”

    Configure Two-factor authentication

    Create an API key

    Complete Sender Authentication

    Create a SendGrid API Key

    https://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021#create-a-sendgrid-api-key

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/sendgrid.tsg-saas-offer?tab=Overview

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/sendgrid.tsg-saas-offer?tab=Overview

Programming languages

  • Bash shell
  • PowerShell

  • JavaScript Node.JS on Mobile services
  • Python
  • PHP
  • Ruby

  • C# .NET
  • Java
  • Java via an Azure webpage

Resources

More

This is one of a series about cloud computing: