Send-MailKitMessage
Send-MailKitMessage copied to clipboard
HtmlDecode of the HtmlBody
Hello,
Is it possible to make the decoding of HTML in HTMLBody optional?
Body.HtmlBody = HttpUtility.HtmlDecode(HTMLBody); //decode html in case it was encoded along the way
I am attempting to have text in the html that contains < and >. I have already encoded it with [System.Web.HttpUtility]::HtmlEncode($foo) in PowerShell, which makes it safe to include in the broader properly-formatted HTMLBody message. The issue is the above call to HttpUtility.HtmlDecode(HTMLBody) will undo it.