Guest User

Untitled

a guest
May 8th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $subject = "Subject Line"
  2. $body = Get-Content "D:tempABCTESTreport.htm"
  3. $smtp= New-Object System.Net.Mail.SmtpClient $smtphost
  4. $msg = New-Object System.Net.Mail.MailMessage $from, $to, $subject, $body
  5. $msg.isBodyhtml = $true
  6. $smtp.send($msg)
  7.  
  8. Get-Help Send-MailMessage -Examples
  9.  
  10. Send-MailMessage -To 'to@email.com' -From 'from@email.com' -Cc 'cc@email.com' -body $bodyhtml -BodyAsHtml
Add Comment
Please, Sign In to add comment