$mail.Subject = "testforloop";
$mail.Priority = "normal"
$mail.Body = #I need contents form a txt file here (e.g. D:\results)#
Any good ideas to deal with it? Thanks!
$mail.Subject = "testforloop";
$mail.Priority = "normal"
$mail.Body = #I need contents form a txt file here (e.g. D:\results)#
Any good ideas to deal with it? Thanks!
Use
Get-Content
to read the text file into a string:Get-Content
has parameters that allow specifying the encoding etc..