new cmdlet for send-mailmessage


I want to send a mail from Powershell with an attachment. On the internet I found “Send-Mailmessage” and the note that it is obsolete. (

What is the new and correct way to send a mail?


Depending on the desired purpose … as long as there’s no official supported replacement I’d recommend to use it just like before.