Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created November 5, 2014 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/7f363be1297e53fad1d1 to your computer and use it in GitHub Desktop.
Save tripflex/7f363be1297e53fad1d1 to your computer and use it in GitHub Desktop.
ps mail
$fromEmail = "Server <server@mydomain.com>"
$smtpServer = "10.10.10.10"
$subject = "Random Subject"
$body = "Random Body"
$emailTo = "Myles <myles@myles.com>", "Bill <bill@bill.com>", "John <john@john.com>"
send-mailmessage -to $emailTo -from "$fromEmail" -subject "$subject" -body "$body" -smtpServer "$smtpServer" -BodyAsHtml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment