/AzureFunctionSendAzureCommEmail

Azure function to send email via Azure Communication Services Email

Primary LanguageC#

Send email with Azure Communication Services

This is an html form which posts to an Azure Function to send an email through Azure Communication Services Email.

Configure your dev environment

This project does not aim to be a complete tuturial, and assumes familiarity with Azure resources and development. This was built in Visual Studio Code and requires your environment to be configured for developing Azure Functions. If you have VS Code configured with the Azure Functions extension, it should work. If you aren't sure, start here: Code and test Azure Functions locally

Configure Azure Communication Services, and Email for Azure Comm Services

Quickstart: Create and manage Communication Services resources

How to send an email using Azure Communication Service

Update code with the settings for your Azure resources

  1. Connection string
  2. MailFrom address from your email communication service
  3. email to — this is not in the Azure portal, it is the address you want to send to, e.g. @hotmail.com or @gmail.com

Test

func start

you should see this in the output

Functions:

        HttpPostTrigger: [POST] http://localhost:7071/api/HttpPostTrigger

The Azure Function is now running locally in the Azure Function emulator. Post the form and you should receive an email at the address entered into your settings (3)s