Hi there,
does anybody know how to adjust this below code to use formatted excel worksheet as body content email ?
thanks
Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin -erroraction silentlyContinue
$smtpServer = "10.10.10.10."
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "sample@dummyemail.com"
$msg.To.Add("sample@dummyemail.com")
$msg.Subject = "Test"
#$msg.Body = "Test"
$msg.IsBodyHTML = $true
$msg.Body = Get-Content ("test.html")
$smtp.Send($msg)
$att.Dispose()