# Powershell script to automatically send outlook email

**URL:** <https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477>\
**Category:** PowerShell Help\
**Created:** [January 7, 2016, 12:48am UTC](https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477 "2016-01-07T00:48:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishna-chaitanya-ja](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@krishna-chaitanya-ja](https://forums.powershell.org/u/krishna-chaitanya-ja)\
**Post date:** [January 7, 2016, 12:48am UTC](https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477/1 "2016-01-07T00:48:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![csandfeld](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@csandfeld](https://forums.powershell.org/u/csandfeld)\
**Post date:** [January 7, 2016, 1:25am UTC](https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477/2 "2016-01-07T01:25:17Z")

</div>

Have a look at the Send-MailMessage Cmdlet:

```
C:\> Get-Help -Name Send-MailMessage -Full
```

---

<div class="post-metadata">

**Author:** ![bobmccoy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bobmccoy/32/650_2.png) [@bobmccoy](https://forums.powershell.org/u/bobmccoy)\
**Post date:** [January 7, 2016, 8:31am UTC](https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477/3 "2016-01-07T08:31:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:43pm UTC](https://forums.powershell.org/t/powershell-script-to-automatically-send-outlook-email/5477/4 "2024-05-16T20:43:19Z")

</div>


