locked
Azure Automation Send-MailMessage RRS feed

  • Question

  • Hello,

    I am playing around with Azure Automation Runbooks.  We have several PowerShell scripts that run on a server that I want to move into Azure.  I have been able to transfer the scripts across. But I can not get the Powershell 

    Send-MailMessage to work.

    I have tried the following

    Send-MailMessage -To "servers@test.com.au" -From"donotreply@test.com.au" -Subject "test-1-2-3-4" -smtpserver 10.255.193.61

    Instead of IP address i did try FQDN but it didnt like that.

    After I run this command it says it was successful . But no email is sent.

    Any ideas ?

    Monday, July 1, 2019 3:51 AM

All replies

  • Hi,

    Do you have Office365? 

    Monday, July 1, 2019 12:57 PM
  • yes we have office365 
    Monday, July 1, 2019 8:59 PM
  • just use this smtp.office365.com
    Monday, July 1, 2019 10:34 PM
  • I am nearly there.

    I think I need to add a username to my

    Credential

    And it should work .

    I will post the results . I think I am nearly there

    Monday, July 1, 2019 10:40 PM