question

petersiffredi-6043 avatar image
0 Votes"
petersiffredi-6043 asked LucasLiu-MSFT commented

Sending Email from an Azure Runbook

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

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

Thanks

office-exchange-server-administrationoffice-exchange-online-itprooffice-exchange-server-mailflowazure-automation
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @petersiffredi-6043 ,
I am writing here to confirm with you how thing going now? If the above suggestion helps, please click “Accept as answer” to mark helpful reply as an answer.Your action would be helpful to other users who encounter the same issue and read this thread.
Thanks for your understanding.



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.


0 Votes 0 ·
tbgangav-MSFT avatar image
1 Vote"
tbgangav-MSFT answered petersiffredi-6043 commented

Hi @petersiffredi-6043,

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@contoso.com but as your requirement is to use noreply@contoso.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


[3]: https://docs.microsoft.com/en-us/azure/automation/automation-send-email




sendgrid1.png (75.4 KiB)
sendgrid2.png (41.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks tbgangav,
That makes sense.

One question you might be able to help, from an O365 perspective how are generic email accounts handled? E.g. for email addresses such as contact@, info@, noreply@, etc do they generally use licensed O365 accounts?

Cheers

0 Votes 0 ·

Hi @petersiffredi-6043, I am not an O365 expert so I have added related O365 / exchange online tags in this question so that someone might help answer your question. Also, you may try asking the question in this forum.


0 Votes 0 ·
LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered LucasLiu-MSFT commented

Hi @petersiffredi-6043 ,
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.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @petersiffredi-6043 ,
Do suggestions above help? If the issue has been resolved, please click “Accept as answer” to mark helpful reply as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well.
Thanks for your understanding.



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.


0 Votes 0 ·