Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

using send-mailmessage to have resulted attachment html file placed in the body of message

$
0
0
Hi. Thanks for the time. I guess the title is a bit confusing. What I am trying to is 1) export a list to an htm file and then 2) email that htm into the body of the email.  Can this be done using send-mailMessage? This is what I have below and it works as an attachment but I want to put it the attachment into the body of the email.

get-messagetrackinglog -resultsize unlimited -recipient me@domain.com -start (get-date).adddays(-1) |select messageid -unique | measure | ft count > c:\myfolder\emails.htm

Send-MailMessage -to "me@domain.com" -subject "Daily" -smtpserver smtp -from "me@domain.com" -attachment "c:\myfolder\emails.htm"

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>