Limitations on mailto: Arguments

J

jim evans

I am trying to send a block of text in the body of an email using the
mailto: &body method. Apparently there are various characters that
cannot be included in a string you send this way. After fooling with
it for an hour I figured out that one of them is the ampersand
delimiter (&). But after I stripped those out another character seems
to have taken its place. I know simple character data works fine
because I tested it with about 10K of aBc's etc.

Is there a list of the characters that cannot be included in mailto:
arguments?

jim
 
J

Jonathan N. Little

jim said:
I am trying to send a block of text in the body of an email using the
mailto: &body method. Apparently there are various characters that
cannot be included in a string you send this way. After fooling with
it for an hour I figured out that one of them is the ampersand
delimiter (&). But after I stripped those out another character seems
to have taken its place. I know simple character data works fine
because I tested it with about 10K of aBc's etc.

Is there a list of the characters that cannot be included in mailto:
arguments?

jim

Form to email this way is very unreliable. Think about it, there are a
large number of folks who only have webmail and this will fail
miserably. Build a server-side script, PHP or Perl etc to receive your
form data and generate the email to relay it to you.
 
T

Toby Inkster

jim said:
I am trying to send a block of text in the body of an email using the
mailto: &body method. Apparently there are various characters that
cannot be included in a string you send this way. After fooling with
it for an hour I figured out that one of them is the ampersand
delimiter (&).

mailto:[email protected]?subject=X%26Y&body=%22X%26Y%22+is+a+Coldplay+album

Using any of this stuff after the '?' is really stupid though. In many
situations it will break, and people may be unable to mail you; or if they
are able to mail you, they won't use the subject lines or body specified.

That said, if *I* wanted to e-mail *you*, what makes you think that *you*
should set the subject line? If I'm the one sending the e-mail, surely
only I know what the e-mail is about?
 
J

Jonathan N. Little

Toby Inkster wrote:
That said, if *I* wanted to e-mail *you*, what makes you think that *you*
should set the subject line? If I'm the one sending the e-mail, surely
only I know what the e-mail is about?

To give a credible answer to this question, long time ago when websites
were new and hosting with CGI support was very expensive I use Jim's
method because my choices were limited and the subject line had codes to
help flag and sort the email when I received it. But hosting with CGI is
much more affordable and pervasive now and server-side is the way to go.
I advised him as such.

The only place where I still use 'mailto' links is in the
copyright|webmaster line at the bottom of pages in website's I manage
and create. It is amazing how inarticulate folks can be with email! I
receive countess emails where folks will ask questions about things but
neglected to describe or reference in their message what they are
talking about! Prime examples are throughout this NG! ;-) I use code to
insert domain and page title into the subject line. Either folks don’t
mind, don’t notice, don’t know how to change, or are too lazy to change
the subject line afterwards, but at times it has been helpful to orient
me when I receive email comments.
 
J

jim evans

mailto:[email protected]?subject=X%26Y&body=%22X%26Y%22+is+a+Coldplay+album

Using any of this stuff after the '?' is really stupid though. In many
situations it will break, and people may be unable to mail you; or if they
are able to mail you, they won't use the subject lines or body specified.

That said, if *I* wanted to e-mail *you*, what makes you think that *you*
should set the subject line? If I'm the one sending the e-mail, surely
only I know what the e-mail is about?

I posted this question here because HTMLers use mailto: more than most
people. I'm not using it on the web, I'm using it in a program of
mine and I'm using it to send diagnostic data. When the program
encounters errors, I collect diagnostic data and want to send it to me
in an email. The users are usually clueless about how to find files
in directories and attach them to email. I decided the easiest way to
do it was to put the diagnostic information in the body of an email,
then all the user has to do is click "Send" But, it's turned into
such a PITA I'm about to give it up.

jim
 
T

Toby Inkster

jim said:
I'm not using it on the web, I'm using it in a program of mine and I'm
using it to send diagnostic data. When the program encounters errors, I
collect diagnostic data and want to send it to me in an email.

So for what do you need a "mailto:" link?

Collect the data up and send it off using something like "blat" (Google
for it), or your own SMTP routines. Don't pass the data via a "mailto:"
link to the user's own e-mail client -- you'll only end up giving *them* a
chance to screw the data up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top