473,416 Members | 1,928 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,416 software developers and data experts.

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

Similar topics

4
by: john Q | last post by:
I found a PHP based email obfuscator for use in websites, where the source HTML (PHP, actually) file doesn't contain the actual email address in the Mailto tag, but generates it and that...
15
by: nAmYzArC | last post by:
Hi everyone, I'm setting the body of an email using values from a form firstname = bob lastname = dole ebody = 'First Name: ' + firstname + '\r\n' + 'Last Name: ' + lastname ...
12
by: catyionic | last post by:
hi, Due to trying many different form options, with none of them working, I opted for this to receive info back from this site: http:\\www.elderslastwish.com <form name="feedback_form"...
10
by: Adam Smith | last post by:
How can I set up a mailto with a cc or bcc as well as a subject designation. The system works for two but not three, is this a hardwired limit or have I missed something ==> <a...
15
by: Rainman | last post by:
In the following simplified tag: <a href='mailto:<address1@somewhere.com>,<address2@nowhere.com>?subject=Testing'> click here</a> When clicked, both addresses appear as "To:" recipients when...
5
by: Joh | last post by:
I'm using mailto to open up an email that have a hyperlink in the body. The hyperlink passes two variables Name and Emailadress. The problem is that only the first variable Name show up in the...
5
by: -Lost | last post by:
I was writing the 7th installment to introducing my children to HTML and came upon something that I am not familiar with, evidently. http://foomanchu.com/standardize7.htm I have two mailto:...
3
by: fiefie.niles | last post by:
Either in ASP or VB using Internet Explorer, how can I do a mailto where the body has a link, and the link has a T=5&S=2 like the following? mailto:fiefie.niles@gmail.com?subject=Help Desk...
6
by: Mike | last post by:
I have to use mailto so the pages opens up the users default client. I need to format the body of the email in HTML format so I can show some the text in bold, italics and underlined? Is this...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.