<# Source: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-client-command-line.html #> $EmailFrom = "from@yourdomain.com" $EmailTo = "email@anydomain.com" $Subject = "Hello from Amazon SES SMTP Test for Windows" $Body = "This message was sent using the Amazon SES SMTP interface. There is no more content in this test email." $SMTPServer = "email-smtp.eu-west-1.amazonaws.com" # Change 'eu-west-1' according to your AWS SES SMTP setup! $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) $SMTPClient.EnableSsl = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("base64 encoded Smtp Username", "base64 encoded Smtp Password"); $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body) Remove-Variable -Name SMTPClient