Powershell/Exemples/Envoie-Mail.ps1
2023-07-04 12:59:44 +02:00

14 lines
612 B
PowerShell

$Destinataires = "hubert.cornet-ext@saint-maclou.com","thedjinhn@gmail.com"
[string[]]$To = $Destinataires.Split(',')
$From = "POWERSHELL@saint-maclou.com"
$Subject = "Exemple 3"
$BODY = "Some important plain text!"
$SmtpServer = "RELAISSMTP.FR.DGS.GROUP"
$Port = "25"
$Attachments = ""
$Bcc = ""
$Cc = ""
$Encoding = ""
$Priority = "Normal"
Send-MailMessage -To $To -From $From -Subject $Subject -Body $BODY -SmtpServer $SmtpServer -Port $Port -BodyAsHtml -Priority $Priority #-Bcc $Bcc -Cc $Cc -Encoding $Encoding -Attachments $Attachments