Add Line Break to mail body

  • Thread starter Thread starter Elyaho
  • Start date Start date
E

Elyaho

i am trying to send mail through smtp it is working properly but the line
breaks in the mail body are not displayed.

if someone could help please
 
Elyaho said:
i am trying to send mail through smtp it is working properly but the
line breaks in the mail body are not displayed.

if someone could help please

Help us to help you: what have you tried so far? Is this plain text email
(use VbCrLf for a line-break) or HTML email (use <br />)?

Andrew
 
it is plain text
Itried :
vbcrlf
Environment.NewLine
/n
/r/n

if i see in the immediate window message.body.tostring it is in the right
format but when i send it through gmail smtp i receive the body in one line
and instead of line breaks, spaces are inserted.
 
Elyaho said:
it is plain text
Itried :
vbcrlf
Environment.NewLine
/n
/r/n

if i see in the immediate window message.body.tostring it is in the
right format but when i send it through gmail smtp i receive the body
in one line and instead of line breaks, spaces are inserted.

OK, VbCrLf is what you need (or use \r\n in C#); what if you send it through
a "normal" SMTP server?

Andrew
 
i tried <br> and it worked the body doesnt seems to be plain text.
how can i change it?? vb visual studio 2005
 
as i already told u it is a matter of setting the body as plain text.
there a field called isbodyhtml it should be set to false.
hope this was clear.
 
Back
Top