By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Open standard e-mail app with subject and body preset

P: n/a
I would like to create a link on my page that opens the standard
e-mail application when someone clicks it. It should have at least the
subject preset, better if I could preset the body as well. I read
somewhere that the TITLE attribute of the A HREF tag can be used to
set a subject, so I tried:

<A HREF="mailto:" TITLE="MySubject">

This would open the e-mail application, but the TITLE attribute is
completely ignored, at least on Win2k/Outlook Express. I wonder if
there is some way in JavaScript? If it can even not be done in
JavaScript, has anyone an idea how I could do this???

Thanks in advance,
Peter
Jul 20 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
620
like this?

<a href="mailto:sd*@sdf.com?subject=subject_text&body =body_text">click</a>

"Peter Amberg" <so*****@yahoo.co.uk> wrote in message
news:f8**************************@posting.google.c om...
I would like to create a link on my page that opens the standard
e-mail application when someone clicks it. It should have at least the
subject preset, better if I could preset the body as well. I read
somewhere that the TITLE attribute of the A HREF tag can be used to
set a subject, so I tried:

<A HREF="mailto:" TITLE="MySubject">

This would open the e-mail application, but the TITLE attribute is
completely ignored, at least on Win2k/Outlook Express. I wonder if
there is some way in JavaScript? If it can even not be done in
JavaScript, has anyone an idea how I could do this???

Thanks in advance,
Peter

Jul 20 '05 #2

P: n/a
Peter Amberg wrote:
I would like to create a link on my page that opens the standard
e-mail application when someone clicks it. It should have at least the
subject preset, better if I could preset the body as well. I read
somewhere that the TITLE attribute of the A HREF tag can be used to
set a subject, so I tried:

<A HREF="mailto:" TITLE="MySubject">

This would open the e-mail application, but the TITLE attribute is
completely ignored, at least on Win2k/Outlook Express. I wonder if
there is some way in JavaScript? If it can even not be done in
JavaScript, has anyone an idea how I could do this???


Save yourself a ton of headaches. If you want to send email, send it
with a form from the server.
<URL: http://www.isolani.co.uk/articles/mailto.html >

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #3

P: n/a
In article <f8**************************@posting.google.com >,
so*****@yahoo.co.uk enlightened us with...
I would like to create a link on my page that opens the standard
e-mail application when someone clicks it.


What if there isn't one?

Schools don't have a default e-mail client.
Internet cafes don't have a default e-mail client.
People who use web based mail (either through their ISP or
yahoo/hotmail/etc) don't have a default e-mail client.
People who use text based mail such as PINE don't have a default e-mail
client.
People who use many browsers but don't configure the mail settings don't
have a default e-mail client.
People who don't want you to know their e-mail address don't use their
default e-mail client.

Using mailto is a Bad Idea unless you've got an intranet application and
you know everyone has, say, Outlook and Windows. Everything else should
use a server-side script to mail a form. There's free formmail scripts
out there, so no excuses. :)

That all said...
<a href="mailto:so*****@whatever.com?subject=mySubjec t">link</a>
will work in many clients. But not all. Nothing works on ALL clients,
which is another reason why mailto is evil. ;)

--
--
~kaeli~
When you choke a smurf, what color does it turn?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #4

P: n/a
620 wrote:
like this?

<a href="mailto:sd*@sdf.com?subject=subject_text&body =body_text">click</a>


Nope. Doesn't work for me.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #5

P: n/a
620
It does work with OE/IE 6. The link your newsreader may have generated in
my post is not valid.

"Randy Webb" <hi************@aol.com> wrote in message
news:3d********************@comcast.com...
620 wrote:
like this?

<a
href="mailto:sd*@sdf.com?subject=subject_text&body =body_text">click</a>
Nope. Doesn't work for me.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #6

P: n/a
In article <EM********************@speakeasy.net>, 62*@200.NET
enlightened us with...
It does work with OE/IE 6. The link your newsreader may have generated in
my post is not valid.


You assume OE because...?

(the whole point is that not everyone HAS OE - just because the OP
specified it doesn't mean only he alone needs it)
--
--
~kaeli~
Local Area Network in Australia:... the LAN down under.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #7

P: n/a
kaeli wrote:
In article <EM********************@speakeasy.net>, 62*@200.NET
enlightened us with...
It does work with OE/IE 6. The link your newsreader may have generated in
my post is not valid.

You assume OE because...?

(the whole point is that not everyone HAS OE - just because the OP
specified it doesn't mean only he alone needs it)

Give up kaeli, the concept eludes him.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #8

P: n/a
Randy Webb <hi************@aol.com> wrote in message news:<b8********************@comcast.com>...
Save yourself a ton of headaches. If you want to send email, send it
with a form from the server.


That's what we have. The problem is, some guys are using our form to
send spam through our server. Not nice. We are going to close the SMTP
port of our server. The link that was suggested by 620 works for our
system. Most other systems will at least open an empty mail window
even if they do not understand the ?subject&body stuff, so it seems to
be a nice solution. Thanks, 620!

Cheers,
Peter
Jul 20 '05 #9

P: n/a
Peter Amberg wrote:
Randy Webb <hi************@aol.com> wrote in message news:<b8********************@comcast.com>...
Save yourself a ton of headaches. If you want to send email, send it
with a form from the server.

That's what we have. The problem is, some guys are using our form to
send spam through our server. Not nice. We are going to close the SMTP
port of our server. The link that was suggested by 620 works for our
system. Most other systems will at least open an empty mail window
even if they do not understand the ?subject&body stuff, so it seems to
be a nice solution. Thanks, 620!


Thats up to you, but mailto is *very* unreliable, see the other threads
the last few days.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #10

P: n/a
620
I assume nothing - I merely made a suggestion to the OP. The only thing I
do assume is that the multi-platform issue is 100%, *blatantly* obvious to
everyone involved web development, and the issue doesn't need to be pointed
out again and again, and again, and again, as the typical "comp.lang.js
holier-than-thou elite" crowd seems to think is so ridiculously necessary to
do.

Excuse the fuck out of me for trying to help someone.

"Randy Webb" <hi************@aol.com> wrote in message
news:Sf********************@comcast.com...
kaeli wrote:
In article <EM********************@speakeasy.net>, 62*@200.NET
enlightened us with...
It does work with OE/IE 6. The link your newsreader may have generated inmy post is not valid.

You assume OE because...?

(the whole point is that not everyone HAS OE - just because the OP
specified it doesn't mean only he alone needs it)

Give up kaeli, the concept eludes him.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #11

P: n/a
620
Hey, if the shoe fits...

You're very welcome.

"Peter Amberg" <so*****@yahoo.co.uk> wrote in message
news:f8**************************@posting.google.c om...
Randy Webb <hi************@aol.com> wrote in message

news:<b8********************@comcast.com>...
Save yourself a ton of headaches. If you want to send email, send it
with a form from the server.


That's what we have. The problem is, some guys are using our form to
send spam through our server. Not nice. We are going to close the SMTP
port of our server. The link that was suggested by 620 works for our
system. Most other systems will at least open an empty mail window
even if they do not understand the ?subject&body stuff, so it seems to
be a nice solution. Thanks, 620!

Cheers,
Peter

Jul 20 '05 #12

P: n/a
In article <WO********************@speakeasy.net>, 62*@200.NET
enlightened us with...
I assume nothing - I merely made a suggestion to the OP. The only thing I
do assume is that the multi-platform issue is 100%, *blatantly* obvious to
everyone involved web development,


Don't assume that.
Surfing around enough would prove the opposite. The number of sites that
use mailto alone would tell you how the issue with it is not a well
known one. Even tutorial sites tell people to use it. Commercial sites
use it.
You're giving people too much credit. Most people who do development
start out like I did - with simple tutorial sites, none of which push
home the fact that not all browsers do all things. At least they don't
stress it enough, IMO.

We hammer it in because we see it over and over and over...and because
most people who post here honestly don't know about these issues.
They're new. We were all new at some point in time.

Crap, a good quarter of the *commercial* sites I visit don't work nice
in Opera because of their stylesheets alone. Much less people's personal
sites or small business sites. And, even worse, browser detection that
relies on the navigator name.

Heck, I didn't know about relative font sizes being preferable (and why)
until after I'd been coding small sites for over 3 years. No one told
me.

--
--
~kaeli~
Does the name Pavlov ring a bell?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #13

P: n/a
kaeli wrote:
People who use text based mail such as PINE don't have a default e-mail
client.
You stated this previously, and it is still wrong if said globally.
Even `pine' and other text based e-mail clients can be configured
as default e-mail client, e.g. in `lynx' with the file_editor and
personal_mail_address settings in the .lynxrc configuration file.
However,
People who use many browsers but don't configure the mail settings don't
have a default e-mail client.
People who don't want you to know their e-mail address don't use their
default e-mail client.
[...]


is certainly true.
PointedEars
Jul 23 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.