473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Open standard e-mail app with subject and body preset

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
13 4420
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Grocery Clerk | last post by:
I know open() returns a file descriptor and fopen() returns a pointer to FILE. The question is, when do I use fopen() and when do I use open()? Could someone give me an example when to use one...
6
by: Rolf Schroedter | last post by:
(Sorry for cross-posting). I need to access large files > 2GByte (Linux, WinXP/NTFS) using the standard C-library calls. Till today I thought I know how to do it, namely for Win32: Use open(),...
13
by: Blue | last post by:
Hi , Can any one please let me explain me the diffrences between "open"/ "fopen" or "read"/"fread" or "write/fwrite". I know that "open" /"read" / "write" are system calls and "fopen"...
9
by: ferbar | last post by:
Hi all, I'm trying to read from the txt file 'ip.packets.2.txt' using the read function. It seems everything ok, but I get a -1 when executing >>bytesr = read(fdo1, bufread, 2); The 'open'...
9
by: Charles F McDevitt | last post by:
I'm trying to upgrade some old code that used old iostreams. At one place in the code, I have a path/filename in a wchar_t string (unicode utf-16). I need to open an ifstream to that file. ...
6
by: PengYu.UT | last post by:
The following code open the file "example.txt" in the current directory. int main () { ofstream myfile; myfile.open ("example.txt"); myfile << "Writing this to a file.\n"; myfile.close();...
3
by: magicman | last post by:
Is difference lies in the fact that fopen part of c library and platform in-depended, whereas open is a system call? what about functionalities? thx
3
by: gggram2000 | last post by:
Hi, I need some assistance. I'ved been searching the web for days now and can't find an example that really helps me. I have an EPSON TM-T88IV printer through which I want to open a cash drawer. I...
22
by: Ken Foskey | last post by:
On Thu, 14 Aug 2008 10:09:01 -0700, raylopez99 wrote: The facts of the case above are that the person took a whole application and distributed it after some minor modifications, ie they did not...
7
by: sam | last post by:
Sir, I just wanted to know how will open a file in c++(Any exe file or any other type file) and if i wanted to run that exe , How will i ? Please provide me little idea and code of this program....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.