eMail - funny characters

Discussion in 'ASP .Net' started by Ramon, May 7, 2006.

  1. Ramon

    Ramon Guest

    I send email using ASP.NET using SMTP like this:

    objMailMessage.From = New System.Net.Mail.MailAddress(strYourEmail)

    objMailMessage.To.Add()

    objMailMessage.Subject = "Title"

    objMailMessage.Body = "Message"

    objMailMessage.IsBodyHtml = False

    smtp.Send(objMailMessage)

    I get the email and all accents are funny characters.

    Suggestion to avoid the funny characters?

    txs for answering....
    Ramon, May 7, 2006
    #1
    1. Advertising

  2. You would typically encode them.

    Search on smtp and encode at google.

    You can also manually replace the strings
    with the proper encoding yourself.

    --
    Robbe Morris - 2004-2006 Microsoft MVP C#
    Earn money answering .NET questions
    http://www.eggheadcafe.com/forums/merit.asp





    "Ramon" <> wrote in message
    news:IAr7g.59$...
    >I send email using ASP.NET using SMTP like this:
    >
    > objMailMessage.From = New System.Net.Mail.MailAddress(strYourEmail)
    >
    > objMailMessage.To.Add()
    >
    > objMailMessage.Subject = "Title"
    >
    > objMailMessage.Body = "Message"
    >
    > objMailMessage.IsBodyHtml = False
    >
    > smtp.Send(objMailMessage)
    >
    > I get the email and all accents are funny characters.
    >
    > Suggestion to avoid the funny characters?
    >
    > txs for answering....
    >
    >
    >
    >
    Robbe Morris [C# MVP], May 7, 2006
    #2
    1. Advertising

  3. Set the BodyEncoding property to some encoding that supports the characters.

    Ramon wrote:
    > I send email using ASP.NET using SMTP like this:
    >
    > objMailMessage.From = New System.Net.Mail.MailAddress(strYourEmail)
    >
    > objMailMessage.To.Add()
    >
    > objMailMessage.Subject = "Title"
    >
    > objMailMessage.Body = "Message"
    >
    > objMailMessage.IsBodyHtml = False
    >
    > smtp.Send(objMailMessage)
    >
    > I get the email and all accents are funny characters.
    >
    > Suggestion to avoid the funny characters?
    >
    > txs for answering....
    >
    >
    >
    >
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, May 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    5
    Views:
    450
    John Harrison
    Jul 12, 2004
  2. Replies:
    2
    Views:
    501
  3. Matt
    Replies:
    2
    Views:
    393
    Dave Thompson
    Jul 19, 2004
  4. sophie_newbie

    Dealing with "funny" characters

    sophie_newbie, Oct 20, 2007, in forum: Python
    Replies:
    6
    Views:
    696
    Diez B. Roggisch
    Oct 22, 2007
  5. Replies:
    7
    Views:
    353
    Peter J. Holzer
    May 10, 2006
Loading...

Share This Page