SendGrid Email Task for Azure DevOps to send emails from a build/release definition
Prerequisites
You need to have a SendGrid Account created with an appropriate plan. You can learn more about SendGrid from the SendGrid Official Website.
Obtain the API Key required to access the SendGrid API by following the instructions on the Official Documentation.
Add the SendGrid Email Task
Install the SendGrid Email Task in to your Azure DevOps account and search for the task in the available tasks. The task will appear in the Utility section of the task list. Add it to your build/release task.
Configure SendGrid Section
Configure SendGrid section has one required configuration you need to set.
Available Options
SendGrid API Key : API Key given by SendGrid. You can generate an API Key from the SendGrid Portal(Required)
Email Details Section
Email Details section has 4 required configuration you need to set. Sender Email Address, To Address(s), Subject and Email Body
Available Options
Sender Email Address : Email address of the sender. The value can either be only the Email Address(Eg. john@example.com) or the Name and the Email Address(Eg. John Smith john@example.com)(Required)
Recipient Email Addresses : Email address(s) of the recipient(s). Use a comma (,) separated list if you have multiple email addresses. (Eg. john@example.com, bob@example.com). The email addresses can either be only the Email Address(Eg. john@example.com) or the Name and the Email Address(Eg. John Smith john@example.com)(Required)
Subject : Subject of the email. (Required)
Email Body : Contents of the email you want to send.To send HTML body add the HTML here and set the Send as HTML checkbox. (Optional)
Send as HTML : Check this option if you want to send the contents of the email body as HTML. (Optional)