Email encoding problems

Discussion in 'ASP.NET 2.0' started by Aristotle, May 10, 2007.

  1. You may want to try sending an HTML body, setting:

    mail.IsBodyHtml = true;

    The HTML should also have the proper charset in the META tag:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">








    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. Could someone help about this problem :

    I send email from my site with this code

    MailMessage mail = new MailMessage();

    mail.From = new MailAddress( this.FromAddress );
    mail.To.Add( this.ToAddress );
    mail.Subject = this.Subject;
    mail.SubjectEncoding = Encoding.UTF8;

    mail.Body = this.Body;
    mail.BodyEncoding = Encoding.UTF8;

    SmtpClient smtp = new SmtpClient( this.HostName ); //localhost

    smtp.Port = this.HostPort; //default 25
    smtp.Send( mail );


    and this has no problem when a send mail to gmail or yahoo mail boxes, but

    when the mail box is hotmail i have body encoding error. for portuguese and spanish languages

    --this is not a browser user encoding configuration problem for hotmail mail box because i receive
    mails from others sources and i have no problems
     
  3. Well, if someone in the future has this problem remember this,
    HOTMAIL did not support UTF-8.

    Because the solution for my specific problem is change

    mail.BodyEncoding = Encoding.UTF8;
    to the specific encoding that solve your needs in my case:
    mail.BodyEncoding = Encoding.GetEncoding( 'windows-1250' );
     
  4. You are probably aware Msft Hotmail is going through a major change currently.

    There will be extended features for the paid accounts.
    The free "Live" Hotmail accounts will have more features but not everything included with the paid accounts.

    I don't have the specifics yet but I'll try and post them once I do.
    Salute,
    Mark Wisecarver
     
  5. thanks, but your propossal did not solve the problem, i'm also try to change the
    Smtp server from localhost to my smtp server including credentials, etc.

    the problem persists
     

Share This Page