One of my friend helped me to look into this problem and this is what he found on this issue:
Problem with Dotnetnuke where the emails that were being sent from registrations (emails that are in different languages other then English) were not readable in their email clients like hotmail or yahoo.
I believe the problem lies in that hotmail and yahoo mail do not understand the utf-8 encoded emails but Dotnetnuke forces the utf-8 encoding. I tried to debug into this and found the following which seems like maybe a bug in DNN:
When someone registers the email send gets initiated from this file:
admin\users\manageusers.ascx.vb
Ultimately in the stack the SendNotificaiton function bellow will be called:
public static string SendNotification(string MailFrom, string MailTo, string Bcc, string Subject, string Body, string Attachment, string BodyType, string SMTPServer, string SMTPAuthentication, string SMTPUsername, string SMTPPassword)
{
MailFormat format1;
if ((StringType.StrCmp(SMTPServer, "", false) == 0) && (StringType.StrCmp(Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPServer"])), "", false) != 0))
{
SMTPServer = Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPServer"]));
}
if ((StringType.StrCmp(SMTPAuthentication, "", false) == 0) && (StringType.StrCmp(Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPAuthentication"])), "", false) != 0))
{
SMTPAuthentication = Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPAuthentication"]));
}
if ((StringType.StrCmp(SMTPUsername, "", false) == 0) && (StringType.StrCmp(Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPUsername"])), "", false) != 0))
{
SMTPUsername = Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPUsername"]));
}
if ((StringType.StrCmp(SMTPPassword, "", false) == 0) && (StringType.StrCmp(Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPPassword"])), "", false) != 0))
{
SMTPPassword = Convert.ToString(RuntimeHelpers.GetObjectValue(Globals.HostSettings["SMTPPassword"]));
}
if (StringType.StrCmp(BodyType, "", false) != 0)
{
string text2 = Strings.LCase(BodyType);
if (StringType.StrCmp(text2, "html", false) == 0)
{
format1 = MailFormat.Html;
}
else if (StringType.StrCmp(text2, "text", false) == 0)
{
format1 = MailFormat.Text;
}
}
return Globals.SendMail(MailFrom, MailTo, "", Bcc, MailPriority.Normal, Subject, format1, Encoding.UTF8, Body, Attachment, SMTPServer, SMTPAuthentication, SMTPUsername, SMTPPassword);
}
Now notice that Encoding.UTF8 is being used to send the mail message.
I would have expected that some config section in the DNN config file (web.config) would have some control over the encoding of the response email for example these flags?
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
<!--<globalization culture="en-US" uiCulture="en" fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1"/>-->
Should the DNN administrator have control over what format the email gets sent in?
Thanks,
Laszlo