kbaker827

Untitled

Sep 15th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##############################################################################
  2. $From = "YourEmail@gmail.com"
  3. $To = "AnotherEmail@YourDomain.com"
  4. $Cc = "YourBoss@YourDomain.com"
  5. $Attachment = "C:\temp\Some random file.txt"
  6. $Subject = "Email Subject"
  7. $Body = "Insert body text here"
  8. $SMTPServer = "smtp.gmail.com"
  9. $SMTPPort = "587"
  10. Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `
  11. -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `
  12. -Credential (Get-Credential) -Attachments $Attachment
  13. ##############################################################################
Add Comment
Please, Sign In to add comment