public void EmailMessages_CreateForward_HtmlEncoding() { EmailMessage receivedEmail = EmailMessageT.CreateEmailMessage(0, fromAddress: "*****@*****.**", toAddress: "*****@*****.**" , subject: "=?UTF-8?Q?nu=C2=A4=20=C3=82=20=C3=80=20=C2=A2?="); receivedEmail.RawEmailIn = @"MIME-Version: 1.0 Date: Thu, 10 Oct 2019 06:27:02 -0700 Message-ID: <CAALTEpk8yAUh7pO=FzgCy0r0b20Fi5vefw_8yhRvstMfTvRtAQ@mail.gmail.com> Subject: & subject From: =?UTF-8?Q?Bobby_Wiggleh=C3=81rt?= <*****@*****.**> To: Bobby Wigglehart <*****@*****.**> Content-Type: multipart/alternative; boundary=""0000000000005e7d3705948e5be6"" X-Antivirus: AVG (VPS 191009-2, 10/09/2019), Inbound message X-Antivirus-Status: Clean --0000000000005e7d3705948e5be6 Content-Type: text/plain; charset=""UTF-8"" non-breaking space less than < greater than > ampersand & --0000000000005e7d3705948e5be6 Content-Type: text/html; charset=""UTF-8"" Content-Transfer-Encoding: quoted-printable <div dir=3D""ltr"">non-breaking space <div>less than <</div><div>greater than ></div><div>ampersand &=C2=A0</div></div> --0000000000005e7d3705948e5be6--"; EmailAddress emailAddress = new EmailAddress() { EmailUsername = "******" }; EmailMessage forwardEmail = EmailMessages.CreateForward(receivedEmail, emailAddress); Assert.AreEqual(emailAddress.EmailUsername, forwardEmail.FromAddress); Assert.AreEqual("FWD: nu¤ Â À ¢", forwardEmail.Subject); Assert.AreEqual("\r\n\r\n\r\nOn " + DateTime.MinValue.ToString() + " [email protected] sent:\r\n>non-breaking space less than <greater than >ampersand &" , forwardEmail.BodyText); }