Powershell script to automatically send outlook email

Welcome Forums General PowerShell Q&A Powershell script to automatically send outlook email

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
2 years, 10 months ago.

  • Author
    Posts
  • #33603

    Participant
    Points: 0
    Rank: Member

    I have a .htm file generated every 1 hour from a source. I need a powershell script to send a mail with that attachment whenever it is run.

    Using Microsoft Outlook 2016

    Pls help
    TIA

  • #33609

    Participant
    Points: 1
    Rank: Member

    Have a look at the Send-MailMessage Cmdlet:

    C:\> Get-Help -Name Send-MailMessage -Full
    
  • #33647

    Participant
    Points: 0
    Rank: Member

    I agree with Christian. There is no value to adding the complexity of using the Outlook client into the mix. If you have an SMTP server in the environment anywhere you can do this fairly quickly. I have samples for Exchange 365, Google Mail, and Hotmail.

The topic ‘Powershell script to automatically send outlook email’ is closed to new replies.