Click here to Skip to main content
15,896,467 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have coding, in that how to get next line in mail message ?
like this
firstline abcdefgh.....
secondline dsfdsfdfs....
thirdline dsfdsfdsdsf......
fourthline sdfdf.......

if i use
it appear in same line, i try in another way also that code follows below

VB

            Dim su As String = "<P> some text </P>"
            su += " <P> dgdfgdfg </P>"
            su += " <P>sdsdfsdfsfs </P>"
            su += "<P>sfdsfsdfsdfsdf </P>"

            Dim attachfilepath As String = "C:\test.txt"
            Dim atm As New Attachment(attachfilepath)
            meg.Subject = " Test Message"
            meg.IsBodyHtml = True
            meg.Attachments.Add(atm)
            meg.Body = su  -----------> mail message,i want in 3 to 5 lines 
            meg.IsBodyHtml = True
            meg.To.Add("aravind@gmail.com")
            mailsender.Send(meg)


pls reply me asap
Regards
Aravind
Posted

1 solution

use
tag For new line:

XML
Dim su As String  = "<P> some text </P>"
            su += " <P><br/> dgdfgdfg </P>"
            su += " <P><br/>sdsdfsdfsfs </P>"
            su += "<P><br/>sfdsfsdfsdfsdf </P>"


You can also remove you

tag and use just only
.
Accept as answer if solve your proble.

 
Share this answer
 
Comments
Aravindba 3-Jul-13 22:53pm    
Hi Thank for ur reply it works ,fine.
And you have any idea for this question ? it possible or not ,pls visit this link http://www.codeproject.com/Questions/613575/how-to-open-outlook-and-add-toaddress-subject-and

Regadrs
Aravind

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900