You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to send a message using the function "send-gmailmessage" with attribute "-bodyashtml", and of course using HTML format in the body.
The issue is that when the message is received, the special characters like "ñ" and "ó" (the message is in Spanish), are not shown correctly.
For example show like "ñ" instead of "ñ" or "ó" instead of "ó"
I tried with the meta into the HTML:
But not working (of course tried also with "UTF-8" instead of "ISO-8859-1")
The powershell command line I'm using is:
Send-GmailMessage -From [email protected] -Subject "Test email sending" -Body $htmlContent -BodyAsHtml -To "[email protected]" -Attachments "[Path of the file to been attached]"
The text was updated successfully, but these errors were encountered:
I had the same issue. And I founded that the broken special characters in UTF-8 is generated by the missuse of the toString() for serializing the message with the C# class MimeKit.MimeMessage. Here the author of the lib explain why you shouldn't use this: jstedfast/MimeKit#554
MimeKit.MimeMessage is called from Send-GmailMessage on line:
$raw = New-MimeMessage @messageParams | Convert-Base64 -From NormalString -To WebSafeBase64String
I'm trying to send a message using the function "send-gmailmessage" with attribute "-bodyashtml", and of course using HTML format in the body.
The issue is that when the message is received, the special characters like "ñ" and "ó" (the message is in Spanish), are not shown correctly.
For example show like "ñ" instead of "ñ" or "ó" instead of "ó"
I tried with the meta into the HTML:
But not working (of course tried also with "UTF-8" instead of "ISO-8859-1")
The powershell command line I'm using is:
Send-GmailMessage -From [email protected] -Subject "Test email sending" -Body $htmlContent -BodyAsHtml -To "[email protected]" -Attachments "[Path of the file to been attached]"
The text was updated successfully, but these errors were encountered: