Sending Emails with PowerShell via Outlook

You can always use Send-MailMessage to send a mail via any SMTP server. If you’d like to use your Outlook client, though, i.e. to keep access to your address books, use your companies Exchange server, or save the mail in your mail history, here is a quick function that shows how:

This is just a basic template, and you can invest some time to make it better. For example, the current version always requires an attachment. In a more sophisticated version, you can make attachments optional and support multiple attachments. Or find a way to send the mail without user interaction.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon 😉

About Lex van der Horst 201 Articles

Be the first to comment

Leave a Reply