character problem when sending email!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff

    character problem when sending email!

    Hey

    asp.net 2.0

    I've configured PasswordRecover y to send password to the user:
    <MailDefiniti on Subject="Ditt Passord"
    BodyFileName="~/Emails/PasswordRecover y.txt" >
    </MailDefinition>

    The problem is that the Norwegian specific characters in PasswordRecover y
    are replaced by some other characters..
    For example "å" is replaced with "?". So sentence like " anbefaler vi deg å
    endre" becomes "anbefaler vi deg ? endre".
    ("anbefaler vi deg å endre" means in English "we recommend you to change")

    How should I go about fixing this problem? add some code in the
    OnSendingMail method which perform a string search & replace of the body
    (search for ? and replace it with å)... or are there some better ways of
    fixing this problem?

    Best Regards


  • =?ISO-8859-1?Q?G=F6ran_Andersson?=

    #2
    Re: character problem when sending email!

    Jeff wrote:
    Hey
    >
    asp.net 2.0
    >
    I've configured PasswordRecover y to send password to the user:
    <MailDefiniti on Subject="Ditt Passord"
    BodyFileName="~/Emails/PasswordRecover y.txt" >
    </MailDefinition>
    >
    The problem is that the Norwegian specific characters in PasswordRecover y
    are replaced by some other characters..
    For example "å" is replaced with "?". So sentence like " anbefaler vi deg å
    endre" becomes "anbefaler vi deg ? endre".
    ("anbefaler vi deg å endre" means in English "we recommend you to change")
    >
    How should I go about fixing this problem? add some code in the
    OnSendingMail method which perform a string search & replace of the body
    (search for ? and replace it with å)... or are there some better ways of
    fixing this problem?
    >
    Best Regards
    >
    It looks like the mail is using an encoding that doesn't support those
    characters.

    I didn't find any property for setting the body encoding in the
    MailDefinition, or in the smtp settings in the config.

    What encoding did you use when you created the text file? Try to save
    the text file as Unicode (Notepad has this option).

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    • Jeff

      #3
      Re: character problem when sending email!

      Thank you ;)


      Comment

      Working...