+34 911 599 883

+34 911 895 172

Envío de mails por powershell

$EmailFrom = “XXXXXXXXX”
$EmailTo = “XXXXXXXXX, jXXXXXXXXX@XXXXXXXXX.es, XXXXXXXXX@XXXXXXXXX.com”
$Fecha = get-date
$Subject = “ASUNTO”
$Body = “AVISO POR PARADA  ” + $Fecha
$SMTPServer = “mail.soporte.si”
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.EnableSsl = $false
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“USER”, “PASSWORD”);
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)