Encode Subject in asp.net email

Nov 23 2015 12:33 AM
Hi,

i have email service which is send to email to all users
some of the user getting below in the subject instead of correct subject

Subject: =?utf-8?B?VGhlIEZyb250IFBhZ2U6IFN0cmF0ZWd5OyBVdGlsaXRpZXM7IEJQQ0wgKEJVWSk7IEhQQ0wgKEJVWSk7IEdTSyBDb25zdW1lciAoQUREKTsgT2lsIEluZGlhIChCVVkpOyBIYXZlbGxzIEluZGlhIChCVVkpOyBCZXJnZXIgUGFpbnRzIChCVVkpOyBQYWdlIEluZHVzdHJpZXMgKFJFRFVDRSk7IFRhdGEgQ2hlbWljYWxzI

have used below code line in the email.

mailObj.SubjectEncoding = System.Text.Encoding.UTF8;
mailObj.BodyEncoding = Encoding.GetEncoding("utf-8");
mailObj.SubjectEncoding = Encoding.GetEncoding("utf-8");

Pls do the needful.

Answers (1)