Problem Using a BodyFile to send a Password recovery Message

Last post 10-03-2007 7:48 AM by XiaoYong Dai – MSFT. 2 replies.

Sort Posts:

  • Problem Using a BodyFile to send a Password recovery Message

    10-01-2007, 7:40 AM
    • Member
      13 point Member
    • XnET
    • Member since 11-13-2006, 3:39 PM
    • Posts 95

    i send my message in Hebrew and in the message i see gibberish so i try to put :

    <META content="text/html; charset=utf-8" http-equiv=Content-Type>

    and it doesnt works  ... what can i do?

     

    Thanks a lot

  • Re: Problem Using a BodyFile to send a Password recovery Message

    10-02-2007, 4:29 AM
    • Member
      13 point Member
    • XnET
    • Member since 11-13-2006, 3:39 PM
    • Posts 95

    Help Anyway?:(

    i have to send the mail in Hebrew ..

    in english it works but i need to send it in Hebrew

    Tnx

  • Re: Problem Using a BodyFile to send a Password recovery Message

    10-03-2007, 7:48 AM
    Answer

    Hi

    Problem might be: Notepad encoding the text use the default "ANSI". but this file is opened in ASP.NET with different character encoding.

    For example: 

    System.IO.StreamReader(Server.MapPath("BodyFile.txt"),Encoding.UTF8)

    Then you may see gibberish in email

    What about use a workround, dynamically change the MailMessage, use a similar code like this

    <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" OnSendingMail="PasswordRecovery1_SendingMail">

     protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
    {

         e.Message.Body = "The accont information message ....";

    }

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (3 items)