Simple question but I can’t find the answer anywhere on MSDN…
Looking for the defaults ASP.NET will use for:
MailMessage.BodyEncoding and MailMessage.SubjectEncoding
If you don’t set them in code?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For
MailMessage.BodyEncodingMSDN says:For
MailMessage.SubjectEncodingI was also unable to find any documented default value, but reflector is to rescue:MimeBasePart.IsAsciiis an internal method which tries to determine whether the passed value is inASCIIencoding:So it seems the default encoding for subject will be
UTF-8in the most cases.