Sending Email from an Azure Runbook

peter siffredi 41 Reputation points
2020-09-22T13:31:25.47+00:00

Hi,
I need to send an email from an Azure Automation PowerShell Runbook. I want the email to come from noreply@Company portal .com. We don't have a licensed user as noreply@Company portal .com.

What's the best way to achieve this? Creating a licensed user to just send emails seems a bit overkill.

Thanks

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,075 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,058 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,227 questions
{count} votes

2 answers

Sort by: Most helpful
  1. tbgangav-MSFT 10,241 Reputation points
    2020-09-23T15:50:12.363+00:00

    Hi @peter siffredi ,

    As per this Azure document, recommended way to send an email from a runbook is with SendGrid. But as shown in below screenshots that are from https://app.sendgrid.com/, we need to do sender authentication and verification in SendGrid which means that our sender email address should be a valid one to which we would initially receive an verification email. So based on this information I believe that we can't send from noreply@Company portal .com but as your requirement is to use noreply@Company portal .com so you may give a try using Send-MailMessage cmdlet approach in runbook (which in general is not a recommended approach).

    27402-sendgrid1.png

    27372-sendgrid2.png

    1 person found this answer helpful.

  2. Lucas Liu-MSFT 6,156 Reputation points
    2020-09-25T08:24:35.117+00:00

    Hi @peter siffredi ,
    Based on my knowledge, users usually create a shared mailbox as a generic email address. Shared mailboxes are used when multiple people need access to the same mailbox. When a user sends an email through the shared mailbox, the sender address seen by the recipient is the email address of the shared mailbox. For shared mailboxes, you could store up to 50GB of data without assigning licenses, but if you want to store more data, you need to assign licenses.
    For more information about shared mailbox you could refer to: About shared mailboxes

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.