Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help : Mailto and forms

6 views
Skip to first unread message

Mpho Molahloe

unread,
Mar 26, 2002, 2:09:30 AM3/26/02
to
Can anyone tell how add a line break in email body sent via mailto protocol?

I want each form element on a seperate line I tried \n but it does work.

Thanx


Xlnt

unread,
Mar 26, 2002, 2:38:47 AM3/26/02
to
"Mpho Molahloe" <mp...@afrigis.co.za> schreef in bericht
news:OBVQbVJ1BHA.2536@tkmsftngp05...

> Can anyone tell how add a line break in email body sent via mailto protocol?
>
> I want each form element on a seperate line I tried \n but it does work.
>
You should encode \n as the email handler doesn't understand \n. It then becomes
%0A.

Example:
window.open('mailto:mp...@afrigis.co.za?body=line1%0Aline2%0Aline3');

You can also use:
var strBody = 'line1\nline2\nline3';
window.open('mailto:mp...@afrigis.co.za?body=' + escape(strBody));

Xlnt


Mpho Molahloe

unread,
Mar 26, 2002, 4:03:07 AM3/26/02
to
If I use %0A the text in the mail is like this
Name : Sammy Email : sa...@steers.co.za


"Xlnt" <xlnt[remove]@myrealbox.com> wrote in message
news:TqVn8.97304$58.44...@zwoll1.home.nl...

Samuel

unread,
Mar 26, 2002, 9:14:35 PM3/26/02
to
The internet standard for new lines in email is a CR and a LF, so use
%0D%0A. That works. You can use %20 for spaces if you wnat to be safe. You
can even use %09 for a tab.

Note that (supposedly) the standard for the mailto protocol specifies that
it is for small messages only, but I got that second-hand, I did not read
it. I was told that because I did encounter a problem when I tried to create
a body with more text in it than was supported. The actual maximum size is
implementation-dependent but for Outlook Expess it is less than 200
characters. Of course it might be the entire address string rather than just
the body that is limited in size. Someone referenced a Microsoft article
acknowlidging that there is a limit and (at the time) no documentation of
the maximum size.


"Mpho Molahloe" <mp...@afrigis.co.za> wrote in message
news:eFuS8UK1BHA.2692@tkmsftngp05...

Mpho Molahloe

unread,
Mar 27, 2002, 1:20:57 AM3/27/02
to
Thanx

It works.

"Samuel" <sam...@socal.rr.com> wrote in message
news:OUb3SUT1BHA.1700@tkmsftngp02...

Aaron Bertrand [MVP]

unread,
Mar 27, 2002, 1:05:49 PM3/27/02
to
> a body with more text in it than was supported. The actual maximum size is
> implementation-dependent but for Outlook Expess it is less than 200
> characters.

Actually, Outlook Express supports mailto URLs up to 2028 characters
(subject, address, body all included). When you hit 2029, you get an error
message that the mail client is not properly configured.

www.aspfaq.com


Samuel

unread,
Mar 27, 2002, 10:48:39 PM3/27/02
to
Where is that documented? I am not the only one that was limited to about
200 characters.

http://www.codeguru.com/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=334994
http://www.codeguru.com/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=227965


"Aaron Bertrand [MVP]" <aaronATaspfaq.com> wrote in message
news:OxhMTnb1BHA.1624@tkmsftngp03...

MVP - Aaron Bertrand

unread,
Mar 27, 2002, 10:58:06 PM3/27/02
to
I don't see it documented anywhere, but it took all of 5 minutes to test. I
was able to do this:

<script>
location.href='mailto:a...@a.com?subject=hi&body=1234567890...upto2028character
s_including mailto:etc';
</script>


"Samuel" <sam...@socal.rr.com> wrote in message

news:epk1$sg1BHA.2848@tkmsftngp05...

Samuel

unread,
Mar 28, 2002, 1:44:07 AM3/28/02
to
I also tested it a few days before posting my question in CodeGuru except it
was not my intent to test it; it was my intent to use it. My program was
working great until I added more data fot the body text. Then suddenly I was
loosing data and it took me a little time to determine that all the data was
in the "mailto" address but it just did not get into the body text. So
whether or not it works the way you are using it does not matter; it does
not work the way I needed it to work and I am not the only one affected by
the problem.

Since the size limitation is not documented it is risky to assume that it is
always possible to get more than 2000 characters in the body. I did try
script such as yours and I am also able to create a message with text in the
body up to 2000 characters but we are both using OE 6. I had a problem when
I was still using IE 5.5, so perhaps this is something that was improved by
IE/OE 6.


"MVP - Aaron Bertrand" <aaronATaspfaq.com> wrote in message
news:eh46Vyg1BHA.956@tkmsftngp03...

kalis

unread,
Mar 29, 2002, 9:05:26 PM3/29/02
to

escape() the subject and the body

Kalis

>.
>

0 new messages