We send calendar invites from our system in multiple languages. (English, Spanish, German etc) Recently we added Georgian and are having issue the the encoding of MailMessage.
For example 'თბილისი' in the email arrives as 'თბილისი'
The email we send includes a HTML AlternateView and a text/calendar AlternateView. I have both AlternateViews TransferEncoding set to QuotedPrintable.
It works correctly for the HTML view but not the calendar view. It always gets sent as 7bit.
In my SmtpClient
I have set DeliveryFormat = SmtpDeliveryFormat.International
This is how I add my AlternateView
:
var iCalInvite = InterviewService.CreateICALInvite(uniqueId, model.StartTimeUTC, model.EndTimeUTC, model.Location, model.Note, personCompany.Person.Email, personCompany.Person.FullName, interviewAttendee, model.Attendees, msg, _currentUser);
iCalInvite.TransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable;
msg.AlternateViews.Add(iCalInvite);
This is the output of the HTML View
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
This is the incorrect output of the calendar view
Content-Type: text/calendar; method=REQUEST; charset=UTF-8;
Content-Transfer-Encoding: 7bit
I've tried setting to the encoding of the MailMessage in a number of combinations but none seems to output the Georgian text correctly.
MailMessage msg = new MailMessage();
msg.BodyTransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable;
msg.BodyEncoding = Encoding.UTF8;
Any help of direction would be greatly appreciated. I've spent hours trying various combinations of encoding to no avail.
Thanks!
Here's an example of what appears in Gmail.
The HTML view appears location appears correctly but the card doesn't.