locked
problem of mail body shown ????? RRS feed

  • Question

  • Hi everyone I made a windows applicatıon for send e mail.And I can send mail with this problem.But in my win.app. I have a string field for write mail body.
    I write mail body like : string body=textbox1.text+"\n"+textbox2.text+"\n"+textbox3.text;
    I want to show this mail body in my hotmail account line by line but it is not shown.it shown side by side.When I show it in my app. mail body shown normaly but when ı send this mail to my hotmail account ıt shown side by side what must ı do to show ıt line by line please help me please :(
    Wednesday, July 22, 2009 2:05 PM

Answers

  • Try this:

    string body=textbox1.text+"\r\n"+textbox2.text+"\r\n"+textbox3.text;

    or this:

    string body=textbox1.text+"<br />"+textbox2.text+"<br />"+textbox3.text;

    If the second one works, then you *should* do it this way:

    string body=HttpUtility.HtmlEncode(textbox1.text) + "<br />" + HttpUtility.HtmlEncode(textbox2.text) + "<br />" + HttpUtility.HtmlEncode(textbox3.text);

    Hope it helps,
    Fernando.


    I always try to Keep it Sharp & simple.
    Wednesday, July 22, 2009 2:19 PM

All replies

  • Try this:

    string body=textbox1.text+"\r\n"+textbox2.text+"\r\n"+textbox3.text;

    or this:

    string body=textbox1.text+"<br />"+textbox2.text+"<br />"+textbox3.text;

    If the second one works, then you *should* do it this way:

    string body=HttpUtility.HtmlEncode(textbox1.text) + "<br />" + HttpUtility.HtmlEncode(textbox2.text) + "<br />" + HttpUtility.HtmlEncode(textbox3.text);

    Hope it helps,
    Fernando.


    I always try to Keep it Sharp & simple.
    Wednesday, July 22, 2009 2:19 PM
  • Thank you very much :) second one ıs workıng......
    Wednesday, July 22, 2009 2:30 PM