Forum Discussion
TomaszWieczorkowski
Apr 20, 2021Copper Contributor
Sending email via Office 365 from Power Shell
Hi, we've just migrated to the Azure & Office 365/Exchange Online. Now we need to reconfigure some of our PowerShell monitoring scripts to send emails via the Exchange Online. Previously we used Exchange On-Premise for such purpose. I've reconfigure the PowerShell scripts from "mail.localdomain.com:25" to the "smtp.office365.com:587" but when I ran the script I've recived the error that there is no TLS (STARTTLS) in place and an email within our domain cannot be send. Could you tell me how to use PowerShell script to send an emails within our domain from it bu using the Exchange Online server ?
2 Replies
Sort By
- This might help: https://github.com/ArchitektApx/Send-O365EWSMailMessage
- TomaszWieczorkowskiCopper Contributor
Thanks pwahlmueller , I'll test it.