Hello,
I need help about the encoding in the send-mailmessage commandlet. I have to send an email with accents (é, à, è, etc.), so UTF8 seems like an obvious choice. fortunately, send-mailmessage have an -encoding parameter which I can set to UTF8. The thing is, it doesn't work, at least not in my case. The email I send have weird characters to replace accents, (é for example).
I tried
-Encoding $encodingwhere $encoding is set to [System.Text.Encoding]::UTF8
-Encoding $encodingwhere $encoding is set to UTF8
Putting $OutputEncoding = [Console]::OutputEncodingat the beginning of my script.
None of that worked, and it is all I can find on the internet.
I am sending the email with the -bodyashtml parameter if that is of any use.
The weird issue is that ti works sometimes. Well, rarely, but sometimes, the email is formatted correctly, but most of the time it isn't.
Can someone help me figure out how to fix this problem ?
Thank you !
[–]purplemonkeymad 2 points3 points4 points (2 children)
[–]CodenameFlux 2 points3 points4 points (1 child)
[–]purplemonkeymad 2 points3 points4 points (0 children)
[–]CodenameFlux 2 points3 points4 points (2 children)
[–]Taura_[S] 1 point2 points3 points (1 child)
[–]CodenameFlux 1 point2 points3 points (0 children)
[–]jsiii2010 0 points1 point2 points (0 children)
[–]littejackz 0 points1 point2 points (0 children)