Help Center
< All Topics


It is difficult to configure access to Microsoft 365 Online email via Azure PowerShell runbooks. It is much easier to configure a plugin to handle sending of emails. Twilio SendGrid is the preferred option, and this has already been added to the Speaakeasy Azure environment.  It supports sending of 100 emails per day for zero cost. The configuration can be found under the Azure resources, listed as SpeakeasyAzureEmailSender. Having configured Twilio SendGrid, a small script can easily be added to a PowerShell script to send emails. It just uses an API key, which has been stored as an Azure automation variable., “TwilioSendGridAPIKey” The script can be found in a few of the existing Azure automation runbooks.

Preventing Twilio mail from being treated as SPAM

Emails from Twilio are configured with a “from” email address which is the Speakeasy office email address. Unfortunately, this then looks like an email address has been spoofed (even though we have properly configured Twilio to use this email address). To prevent the Speakeasy Office 365 system from treating such emails from Twilio as spam, various additional records need to be added to our FastHosts configuration, in accordance with the instructions from Twilio which can be found here:
Once configured correctly, when email is received purporting to be sent from the Speakeasy office email address, but coming from Twilio, it will still be accepted and not put in the junk email folder.

Monitoring Twilio SendGrid Activity

Navigate to SpeakeasyAzureEmailSender, then click on the link named “Open SaaS Account on publisher’s site”. The daily usage of Twilio by Spekeasy can then be seen.