We have crm 365 on-pre v9 that uses server sync connecting to exchange email server. I created a workflow that send out emails with HTML attachment. When the attachment is opened with chrome, the attachment shows html source and weird characters(square with question mark). Almost like it has wrong encoding.
The html is like:
readonly static string messageHead = @"<html>
<head>
<meta charset=""UTF-8"">
<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"" />
<title>Invoice</title>
</head>
<body>
some text
</body>";
ActivityMimeAttachment attachment = new ActivityMimeAttachment();
attachment.MimeType = "text/html";
attachment.ObjectId = new EntityReference(Email.EntityLogicalName, mailId);
attachment.ObjectTypeCode = Email.EntityLogicalName;
attachment.FileName = String.Format("Invoice.{0}.html", v.Key);
attachment.AttachmentNumber = attachNo++;
attachment.Body = Convert.ToBase64String(System.Text.Encoding.Unicode.GetBytes(v.Value.ToString()));
files.Add(attachment);
Am I doing something wrong? Thanks
Holly Li