Home All Groups Group Topic Archive Search About

Add Line Break to mail body

Author
2 Jul 2009 7:46 AM
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

Author
2 Jul 2009 8:05 AM
Andrew Morton
Elyaho wrote:
> 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
Author
2 Jul 2009 8:40 AM
Elyaho
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.

Show quoteHide quote
"Andrew Morton" wrote:

> Elyaho wrote:
> > 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
>
>
>
Author
2 Jul 2009 8:55 AM
Andrew Morton
Elyaho wrote:
> 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
Author
2 Jul 2009 9:49 AM
Elyaho
i tried <br> and it worked the body doesnt seems to be plain text.
how can i change it?? vb visual studio 2005

Show quoteHide quote
"Andrew Morton" wrote:

> Elyaho wrote:
> > 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
>
>
>
Author
2 Jul 2009 9:56 AM
Elyaho
thank you
sorry for bothering i found the solution

Show quoteHide quote
"Andrew Morton" wrote:

> Elyaho wrote:
> > 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
>
>
>
Author
2 Jul 2009 12:07 PM
Andrew Morton
Elyaho wrote:
> thank you
> sorry for bothering i found the solution

It's no bother as long as you tell us what the solution was...

Andrew
Author
2 Jul 2009 1:25 PM
Elyaho
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.

Show quoteHide quote
"Andrew Morton" wrote:

> Elyaho wrote:
> > thank you
> > sorry for bothering i found the solution
>
> It's no bother as long as you tell us what the solution was...
>
> Andrew
>
>
>
Author
2 Jul 2009 8:28 AM
Cor Ligthert[MVP]
</br>

As it is in HTML code

Otherwise simply the vbcrlf

Show quoteHide quote
"Elyaho" <Ely***@discussions.microsoft.com> wrote in message
news:12241816-0F66-45BF-89DC-762315B08377@microsoft.com...
>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