Send an email from one person to another person using PowerShell

Configurare noua (How To)


This example sends an email message from one person to another person. The From, To, and Subject parameters are required by Send-MailMessage. This example uses the default $PSEmailServer variable for the SMTP server, so the SmtpServer parameter is not needed.


Run the PowerShell command:

Send-MailMessage -From ‘User01 <>’ -To ‘User02 <>’ -Subject ‘Test mail’

The Send-MailMessage cmdlet uses the From parameter to specify the message’s sender. The To parameter specifies the message’s recipient.The Subject parameter uses the text string Test mail as the message because the optional Body parameter is not included.

Tip solutie



(6 din 11 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?