Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $subject = "Subject Line"
- $body = Get-Content "D:tempABCTESTreport.htm"
- $smtp= New-Object System.Net.Mail.SmtpClient $smtphost
- $msg = New-Object System.Net.Mail.MailMessage $from, $to, $subject, $body
- $msg.isBodyhtml = $true
- $smtp.send($msg)
- Get-Help Send-MailMessage -Examples
- 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