Created
February 6, 2019 16:54
-
-
Save DevOps-Dad/1de40c85dc94b750cbdb4de902b51e08 to your computer and use it in GitHub Desktop.
Revisions
-
DevOps-Dad created this gist
Feb 6, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ $AWS_ACCESS_KEY = "RealAccessKeyRightHere" $AWS_SECRET_KEY = "TotallyRealSecretKeyRightHere" $SECURE_KEY = $(ConvertTo-SecureString -AsPlainText -String $AWS_SECRET_KEY -Force) $creds = $(New-Object System.Management.Automation.PSCredential ($AWS_ACCESS_KEY, $SECURE_KEY)) $from = "[email protected]" $to = "[email protected]" $subject = "Test SES Message" $body = "Just testing that my AWS SES parameters are correct" Write-Host "Sending Email via AmazonSES" Send-MailMessage -From $from -To $to -Subject $subject -Body $body -SmtpServer email-smtp.us-east-1.amazonaws.com -Credential $creds -UseSsl -Port 587 Write-Host "Sent"