469,949 Members | 2,195 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

Mailto: question

Have a script that takes a form and emails it automatically. Here is the part:
<form onSubmit="return editData();" name="estm" enctype="text/plain" method="post" action="mailto:us**@domain.com?subject=Daily numbers&body=window.this.document">

I would like for it to open the default email program and let me choose an address from that form. Is this possible? Any suggestions are appreciated.

Elvis
Jul 20 '05 #1
12 2702
ElvisIsDead wrote:
Have a script that takes a form and emails it automatically. Here is the
part:
No, you *think* you have a form......
<form onSubmit="return editData();" name="estm" enctype="text/plain"
method="post" action="mailto:us**@domain.com?subject=Daily
numbers&body=window.this.document">

I would like for it to open the default email program and let me choose
an address from that form. Is this possible? Any suggestions are
appreciated.


I have, at the moment, 10 browsers installed. The only one that your
form will even come close to working is in my AOL browser. None of the
others even have a default email application for it, so it always
prompts me to install something, or configure something.

If you want to send mail, reliably, submit your form to the server and
let the server send the mail.

P.S. Even within the AOL browser, where it would semi-work, you still
won't open my Address Book.

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

Jul 20 '05 #2
In article <ZI********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:
ElvisIsDead wrote:
Have a script that takes a form and emails it automatically. Here is the
part:
No, you *think* you have a form......
<form onSubmit="return editData();" name="estm" enctype="text/plain"
method="post" action="mailto:us**@domain.com?subject=Daily
numbers&body=window.this.document">

I would like for it to open the default email program and let me choose
an address from that form. Is this possible? Any suggestions are
appreciated.


I have, at the moment, 10 browsers installed. The only one that your
form will even come close to working is in my AOL browser. None of the
others even have a default email application for it, so it always
prompts me to install something, or configure something.


Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.
If you want to send mail, reliably, submit your form to the server and
let the server send the mail.


If you do that, the sender address of the mail will be the server rather
than the user.

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Jul 20 '05 #3
Barry Margolin wrote:
In article <ZI********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:

ElvisIsDead wrote:
Have a script that takes a form and emails it automatically. Here is the
part:


No, you *think* you have a form......

<form onSubmit="return editData();" name="estm" enctype="text/plain"
method="post" action="mailto:us**@domain.com?subject=Daily
numbers&body=window.this.document">

I would like for it to open the default email program and let me choose
an address from that form. Is this possible? Any suggestions are
appreciated.


I have, at the moment, 10 browsers installed. The only one that your
form will even come close to working is in my AOL browser. None of the
others even have a default email application for it, so it always
prompts me to install something, or configure something.

Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.


And they are extremely *broken*. I typically have to copy/paste the
address to my preferred mail app if I want to send the mail, otherwise
(and most common) is that I skip it.
If you want to send mail, reliably, submit your form to the server and
let the server send the mail.

If you do that, the sender address of the mail will be the server rather
than the user.


Email Address: <input type="text" name="emailAddress" size="40" />
Interesting reading: <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 #4
"Barry Margolin" <ba****@alum.mit.edu> wrote in message
news:ba**************************@comcast.ash.giga news.com...
<snip>
Most computers *do* have mail clients.
And why consider something that can be 100% when you can have "most"?
What do you do when a webpage has a
"mailto:" link on it? These are extremely common.


In a world where the barriers to publishing to the internet do not
include possessing no technical knowledge at all, and a significant
proportion of those making a living from authoring for the internet know
little more than how to operate one ore two pieces of software the
lowest common denominator is not a standard to aspire to.
If you want to send mail, reliably, submit your form to
the server and let the server send the mail.


If you do that, the sender address of the mail will
be the server rather than the user.


If you want peoples e-mail addresses you can always ask them to provide
it. If they think that you actually need it then they probably will be
willing to send it, and if you don't need it then you won't miss it. On
the other hand the "most" people with mail clients may elect not to send
the mail so you cannot get an e-mail address that you don't really need,
for fear that doing so will result in them being spamed. So it comes
down to what the mail if for, if its business then they will want to be
contacted and will send their address, if it is comment that you are
after you will get more if that comment is allowed to be anonymous.

You will also get more business and/or comments if you start off with a
system that will work for 100% of users.

Richard.
Jul 20 '05 #5
In article <Yd********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:
Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.


And they are extremely *broken*.


This is an established, standard type of URL, which has been in use for
almost as long as the web has been around. When was it declared to be
"broken"?

What if you don't have access to any server-side scripting? Client-side
mailto links are the standard way to initiate mail from a web page.
It's silly to require everyone who just wants a simple feedback link to
install a script for it.

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Jul 20 '05 #6
Barry Margolin wrote:
In article <Yd********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:

Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.
And they are extremely *broken*.

This is an established, standard type of URL, which has been in use for
almost as long as the web has been around.


Technically speaking, its a pseudo-protocol (or maybe even a protocol).
When was it declared to be "broken"?
Can you link to an *official* standard that defines the mailto: protocol?

And if you had bothered to read the page I gave the URL for, your
question wouldn't have been repeated - its answered in that page.
What if you don't have access to any server-side scripting?
If you have a commercial site without server-side scripting, then you
need to reconsider your hosting situation. If its a personal page, then
you need to go to www.google.com and search for free email services,
there are way too many out there, that are reliable, that you can use
instead of the broken mailto: protocol.
Client-side mailto links are the standard way to initiate mail
from a web page.
As many forms as I fill out daily to send email, I find that a very
dubious claim. Even AOL offers a formmail script capability for AOL
webpages. Although its limited, its offered for free.
It's silly to require everyone who just wants a simple feedback link to
install a script for it.


No, what is silly is for you to require your visitors to have there
browser set up the way you need it to be set up, in order for your page
to work.

As for needing the email address, I have 8 of them that I regularly use,
if I allow any one of my browsers to setup an email client, which one of
those 8 should it use? And thats 8 permanent ones, I have an unlimited
number of them for my domain name.

As I pointed out, and Richard has also, if you want my email address,
ask for it. If I want you to have it, you will have it. Otherwise, you
won't.

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

Jul 20 '05 #7
In article <ba**************************@comcast.ash.giganews .com>,
ba****@alum.mit.edu enlightened us with...

Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.


If everyone jumps off a bridge, do you follow?

My computer at school has no mail client.
The computers at our local internet cafe have no mail clients.
My computer at work, I would never use the mail client so you could get
my email and spam me.
My computer at home has 5 browsers, none of which are configured to use
a mail client because I prefer to use yahoo so spam is taken care of.
My Mom uses her internet provider's web based mail, so she has no
default client configured. Same for my aunt. They don't even know how to
use Outlook.
My friends, like me, all use yahoo, hotmail, or other web mail to help
reduce spam. Only our friends have our real e-mail addresses. We use our
web mail for any type of contacting of web sites.
My two geek friends use PINE for mail. If you didn't know, that's a Unix
text based mail system and could not be configured to a browser.

We are all stuck copying and pasting the mailto address in our mail if
we want to contact people with that horrid, lazy way of putting their
contact info up.
Even if you have no server-side language, there are several free
services out there for mailform processing and almost any paid web host
has a formmail processor included.

Just because a lot of people do something doesn't mean it's the right
thing to do. A lot of people use absolute font sizes and code for 800 by
600 windows, too. Doesn't make it a good thing.

--
--
~kaeli~
Once you've seen one shopping center, you've seen a mall.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #8
Please let me clarify. This is only part of my script. This will be running on a VPN and not accessable from outside. I just didn't want to hard code an email address. All clients will be using Outlook 2k, attached to my Exchange server, as the mail client.
"ElvisIsDead" <do********@replytogroup.com> wrote in message news:c1********@library1.airnews.net...
Have a script that takes a form and emails it automatically. Here is the part:
<form onSubmit="return editData();" name="estm" enctype="text/plain" method="post" action="mailto:us**@domain.com?subject=Daily numbers&body=window.this.document">

I would like for it to open the default email program and let me choose an address from that form. Is this possible? Any suggestions are appreciated.

Elvis
Jul 20 '05 #9
<snip>
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001E_01C3F798.624B7D70"


Messages posted to comp.lang.javascript should be plain text only.

<URL: http://jibbering.com/faq/#FAQ2_3 >

Richard.
Jul 20 '05 #10
In article <8L********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:
Barry Margolin wrote:
In article <Yd********************@comcast.com>,
Randy Webb <hi************@aol.com> wrote:

Most computers *do* have mail clients. What do you do when a webpage
has a "mailto:" link on it? These are extremely common.

And they are extremely *broken*.

This is an established, standard type of URL, which has been in use for
almost as long as the web has been around.


Technically speaking, its a pseudo-protocol (or maybe even a protocol).
When was it declared to be "broken"?


Can you link to an *official* standard that defines the mailto: protocol?


It's in RFC 2368:

<ftp://ftp.rfc-editor.org/in-notes/rfc2368.txt>

I aso did a search for "mailto" from www.w3c.org, and the following two
pages mention it:

<http://www.w3.org/Addressing/URL/4_1_Mailto.html>
<http://www.w3.org/TR/WD-html40-970917/htmlweb.html#mailto-url>
And if you had bothered to read the page I gave the URL for, your
question wouldn't have been repeated - its answered in that page.
I have now. That page seems to be specifically addressing the use of
"action=mailto:..." in forms. I was thinking of static web pages with
simple mailto links.

BTW, if you're a stickler for following best practices, please do so
when mentioning web sites in your text. W3C recommends that when URLs
are included in ordinary ASCII text, they be surrounded by "<URL:" and
">", not "<URL: " and " /URL>".
No, what is silly is for you to require your visitors to have there
browser set up the way you need it to be set up, in order for your page
to work.


Isn't it also silly to force them to use your form rather than allowing
them to use a full-featured mail client that they're more familiar with?
E.g. if the user has a preferred email address, it will probably be
configured in their client; it can send attachments; they can CC others,
they can save the message in their Sent Mail folder; it might perform
spell checking; etc.

I can certainly appreciate the use of a form if you're doing more than
just starting up a mail client, like requesting lots of additional
information that needs to accompany the feedback (e.g. a bug reporting
page asking for version and platform data). But it sure seems like
overkill when all you're doing is "If you have any comments, please send
mail to jo*@whatever.com".

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Jul 20 '05 #11
> Elvis

Cgiemail is one server side program for emailing forms. You may
create a template and have cgiemail fill in the template. Thus, you
can create a nice form letter. You will either need to supply the
email address in the form or use a static email address.

See:
http://web.mit.edu/wwwdev/cgiemail/

Robert
Jul 20 '05 #12
Barry Margolin wrote:

Isn't it also silly to force them to use your form rather than allowing
them to use a full-featured mail client that they're more familiar with?


Ahem...sorry to interrupt, but...the answer is: No, not at all. For
example, many, many many many users use webmail. I do. I use yahoo
mail, and I do not use a mail client. I switch between many browsers,
none of them are configured to send mail... none.

You can never assume that mailto: will work. It is a useless mechanism
for having users send mail.

Here is another example... Back when I used a POP client, I set my
browser up to use my POP program as my default mail. My dad used the
computer, and used a mailto. Guess who got the reply? Me... not him.

By using a form-mail solution, you can guarantee, without a doubt, that
if valid information is entered, that the mail will go where it is
supposed to.

Mailto: works, but it does not work well. It is important to recognize
that there are many mechanisms for web programmers to use, that have
major flaws. Mailto is one of them.

Brian

Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by nAmYzArC | last post: by
12 posts views Thread by catyionic | last post: by
10 posts views Thread by Adam Smith | last post: by
15 posts views Thread by Rainman | last post: by
5 posts views Thread by Joh | last post: by
3 posts views Thread by fiefie.niles | last post: by
6 posts views Thread by Mike | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.