TicTacTech.net Forums
Send Email in your PowerShell Script - The Modern Method - Printable Version

+- TicTacTech.net Forums (https://tictactech.net/forum)
+-- Forum: Technology (https://tictactech.net/forum/forumdisplay.php?fid=4)
+--- Forum: Coding and Webmastering (https://tictactech.net/forum/forumdisplay.php?fid=6)
+--- Thread: Send Email in your PowerShell Script - The Modern Method (/showthread.php?tid=38)



Send Email in your PowerShell Script - The Modern Method - tictactech.net - 11-11-2023

Send Email in your PowerShell Script - The Modern Method


With modern companies using hosted email solutions, Microsoft has deprecated the use of the Send-MailMessage PowerShell cmdlet. The supported to way to send emails from a PowerShell script is with the Microsoft Graph API. Unfortunately, this is not as simple as using an on-premises SMTP server, but it's much more secure. And by building a proper PowerShell function, it's just as easy to integrate within your scripts. This does require an Office365 tenant and subscription. I will outline the steps and give an example of how to send emails with this method.

Read More …


https://tictactech.net/category-blog/powershell/send-email-in-your-powershell-script-the-modern-method


RE: Send Email in your PowerShell Script - The Modern Method - welly321 - 11-12-2023

Very useful, Thanks!