Im sending a testemail via powershell like
$messageParameters = @{
Subject = "Email Tool"
Body = Get-Content "C:\body.txt" | out-string
From = "Info <[email protected]>"
To = "Me <[email protected]>"
SmtpServer = "mail.xy.de"
Encoding = New-Object System.Text.UTF8Encoding
}
send-mailmessage @messageParameters -BodyAsHtml
everything is working find except the encoding.
if i don't use encoding some characters are send as ??
and if i use it, what i actually want to do, than i get this Ä Ö Ü
but it should be ä ö ü and not this above.
If i don't send the mail as HTML it works.
How can i send the mail with the right encoding AND as html ?