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

name instead of email address in To: field from mailto: link

P: n/a
I am trying to set up a mailto: link so that the actual address that
the email is being sent to is obscured and replaced by a name. For
example, I have <a href="mailto:js*****@abc.com">Joe Schmoe</a>. When
this link is clicked, an email window appears in the clicker's email
client where the To: field is js*****@abc.com. What I want to have
displayed there is Joe Schmoe. I've seen it suggested that formatting
the link like this: <a href="mailto:Joe Schmoe<js*****@abc.com>">Joe
Schmoe</a> will work. I've tried that to no avail. I also took a
stab in the dark and tried
<a href="mailto:js*****@abc.com?To=Joe%20Schmoe">Joe Schmoe</a> but
that didn't work either. Any help here would be greatly appreciated.
Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
18 Replies


P: n/a

"Shinin" <bw*******@snl.com> wrote in message
news:99*************************@posting.google.co m...
I am trying to set up a mailto: link so that the actual address that
the email is being sent to is obscured and replaced by a name. For
example, I have <a href="mailto:js*****@abc.com">Joe Schmoe</a>. When
this link is clicked, an email window appears in the clicker's email
client where the To: field is js*****@abc.com. What I want to have
displayed there is Joe Schmoe. I've seen it suggested that formatting
the link like this: <a href="mailto:Joe Schmoe<js*****@abc.com>">Joe
Schmoe</a> will work. I've tried that to no avail. I also took a
stab in the dark and tried
<a href="mailto:js*****@abc.com?To=Joe%20Schmoe">Joe Schmoe</a> but
that didn't work either. Any help here would be greatly appreciated.
Thanks.


Try mailto:Joe%20Schmoe%20%3cjs*****@abc.com%3e

In other words,
Joe Schmoe <js*****@abc.com>

Jul 20 '05 #2

P: n/a
in post: <news:99*************************@posting.google.c om>
bw*******@snl.com (Shinin) said:
I am trying to set up a mailto: link so that the actual address that
the email is being sent to is obscured and replaced by a name.


&deity; will punish your evil doings

--
brucie - i usenet nude
Jul 20 '05 #3

P: n/a
On 30 Jan 2004 10:26:44 -0800, Shinin <bw*******@snl.com> wrote:
I am trying to set up a mailto: link so that the actual address that
the email is being sent to is obscured and replaced by a name. For
example, I have <a href="mailto:js*****@abc.com">Joe Schmoe</a>. When
this link is clicked, an email window appears in the clicker's email
client where the To: field is js*****@abc.com. What I want to have
displayed there is Joe Schmoe.
Oh my. I wonder what you hope to gain here. You won't be hiding the email
address.
I've seen it suggested that formatting
the link like this: <a href="mailto:Joe Schmoe<js*****@abc.com>">Joe
Schmoe</a> will work. I've tried that to no avail. I also took a
stab in the dark and tried
<a href="mailto:js*****@abc.com?To=Joe%20Schmoe">Joe Schmoe</a> but
that didn't work either. Any help here would be greatly appreciated.
Thanks.


mailto protocols aren't universally recognized. Even setting a subject
isn't a guarantee the subject will appear.

I recommend not using a mailto link at all. Instead, set up a form. The
nmc version of formmail at http://www.scriptarchive.com is easy to
install. Your host must allow you to have CGIs, if they do all the
necessary information you need to set it up should be available from the
tech help section of their website.

Jul 20 '05 #4

P: n/a
On Sat, 31 Jan 2004 04:29:55 -0500, Neal <ne*****@spamrcn.com> wrote:
The nmc version of formmail at http://www.scriptarchive.com is easy
to install.


It's also rather out of date. Get the newest version directly from the
NMS project: http://nms-cgi.sourceforge.net/

Cheers,
Philip
--
Philip Newton <no***********@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
Jul 20 '05 #5

P: n/a
On Sat, 31 Jan 2004 10:45:30 +0100, Philip Newton
<pn*************@newton.digitalspace.net> wrote:
On Sat, 31 Jan 2004 04:29:55 -0500, Neal <ne*****@spamrcn.com> wrote:
The nmc version of formmail at http://www.scriptarchive.com is easy
to install.


It's also rather out of date. Get the newest version directly from the
NMS project: http://nms-cgi.sourceforge.net/


News to me, thanks for the link.
Jul 20 '05 #6

P: n/a
On Sat, 31 Jan 2004 04:29:55 -0500, Neal <ne*****@spamrcn.com> wrote:
mailto protocols aren't universally recognized. Even setting a subject
isn't a guarantee the subject will appear.
AIUI mailto is a recognised standard (if I was less lazy I'd quote the
RFC) though not all browser/email-client combinations support it. OTOH
setting the subject is not standardised, and decreases the chances of
the mailto link working.
I recommend not using a mailto link at all. Instead, set up a form.


I'd recommend supplying both.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #7

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<bv************@ID-114100.news.uni-berlin.de>...

Try mailto:Jo***********************@abc.com%3e

In other words,
Joe Schmoe <js*****@abc.com>


To be standards-compliant, there should be quotes around the
human-readable-name portion, since it contains a space; in other
words:

mailto:%22Joe%20Schmoe%22%20%3cjs*****@abc.com%3e

"Joe Schmoe" <js*****@abc.com>

However, at least in my browser (Mozilla), the resulting mail window
comes up with both the human-readable name and the actual address
showing; it doesn't "hide" anything. And that's the way things
*ought* to be.

Maybe with Microsoft idiotware, though, the technique would "work",
given how that software loves to hide things from its users.

--
Dan
Jul 20 '05 #8

P: n/a
Neal wrote:

mailto protocols aren't universally recognized.
....by web user-agents. That last part is important. The mailto
protocol is registered.

http://www.w3.org/Addressing/URL/4.1_Schemes.html
Even setting a subject isn't a guarantee the subject will appear.
No, but then, subject isn't part of the mailto: protocol.
I recommend not using a mailto link at all. Instead, set up a form. These are not mutually exclusive. The best solution is to offer both
an email address and a form.
The nmc version of formmail at http://www.scriptarchive.com
nmc? Who are they? The link you provided points to Matt's Script Archive.

To the OP: I highly recommend that you consider the NMS formmail
script. Better written. Better support. Allows you to hide the
destination email address from spambots. And also free.

http://nms-cgi.sourceforge.net/
Your host must allow you to have CGIs, if they do all the necessary
information you need to set it up should be available from the tech
help section of their website.


Many isp's offer a formmail script built in to the hosting package.
You may already have a formmail and not know it. This, too, is
something for tech support to answer.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #9

P: n/a
On Sat, 31 Jan 2004 18:38:13 GMT, Brian
<us*****@julietremblay.com.invalid-remove-this-part> wrote:
The nmc version of formmail at http://www.scriptarchive.com
nmc? Who are they? The link you provided points to Matt's Script Archive.


Yeah, I speled it rong. Fortunately, I think other readers figured it
out... And at the time, I was unaware that nm"S" had a separate site, I
had only encountered the older script versions at Matt's site.
To the OP: I highly recommend that you consider the NMS formmail
script. Better written. Better support. Allows you to hide the
destination email address from spambots. And also free.

http://nms-cgi.sourceforge.net/


Now that I know it's available in a more recent version, I can't disagree.
Jul 20 '05 #10

P: n/a
da*@tobias.name (Daniel R. Tobias) wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<bv************@ID-114100.news.uni-berlin.de>...

Try mailto:Jo***********************@abc.com%3e

In other words,
Joe Schmoe <js*****@abc.com>


To be standards-compliant, there should be quotes around the
human-readable-name portion, since it contains a space;


If it contains a space or if it contains an escape code standing in
for a space?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ōter le premier point de mon adresse de courriel.
Jul 20 '05 #11

P: n/a
Neal wrote:
On Sat, 31 Jan 2004 18:38:13 GMT, Brian wrote:
The nmc version of formmail at http://www.scriptarchive.com


nmc? Who are they? The link you provided points to Matt's Script
Archive.


Yeah, I speled it rong. Fortunately, I think other readers figured
it out...


Everyone except me, it seems. Sorry, it didn't occur to me that you
meant "nms."

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #12

P: n/a
On Sat, 31 Jan 2004 23:01:38 GMT, Brian
<us*****@julietremblay.com.invalid-remove-this-part> wrote:
Neal wrote:
On Sat, 31 Jan 2004 18:38:13 GMT, Brian wrote:
The nmc version of formmail at http://www.scriptarchive.com

nmc? Who are they? The link you provided points to Matt's Script
Archive.


Yeah, I speled it rong. Fortunately, I think other readers figured
it out...


Everyone except me, it seems. Sorry, it didn't occur to me that you
meant "nms."


Line 32, column 56: element "NMC" undefined :)

I should have known that was wrong though. NMC was the summer camp I went
to as a kid. Maybe I'm subconsciously pining for warmer days...
Jul 20 '05 #13

P: n/a
Tim
"Harlan Messinger" <h.*********@comcast.net> wrote
Try mailto:Jo***********************@abc.com%3e

In other words,
Joe Schmoe <js*****@abc.com>


da*@tobias.name (Daniel R. Tobias) wrote:
To be standards-compliant, there should be quotes around the
human-readable-name portion, since it contains a space; in other
words:


It shouldn't be necessary, blank spaces are allowed in the so-called
"display name" that goes along with an e-mail address (the server
ignores stuff outside of the < >, that extra stuff is just for your
benefit).

Generic e-mail syntax: display name <address> (comments)

Example: John Doe <jd**@example.com> (Manager)

If there was a comma, though, you would need to quote the name, as
commas are used as delimiters between multiple addresses (the quotes
stop that comma being interpreted as a delimiter).

e.g. "Doe, John" <jd**@example.com>, Jane Doe <ja***@example.com>

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #14

P: n/a
Tim <Ti*@mail.localhost> wrote in message news:<ut********************************@4ax.com>. ..
da*@tobias.name (Daniel R. Tobias) wrote:
To be standards-compliant, there should be quotes around the
human-readable-name portion, since it contains a space; in other
words:


It shouldn't be necessary, blank spaces are allowed in the so-called
"display name" that goes along with an e-mail address (the server
ignores stuff outside of the < >, that extra stuff is just for your
benefit).


By my reading of RFC 2822:
http://www.rfc-editor.org/rfc/rfc2822.txt
the quotes are necessary in the display name if spaces are included.

To see why, you have to untangle a series of BNF definitions:

address = mailbox / group
mailbox = name-addr / addr-spec
name-addr = [display-name] angle-addr
angle-addr = [CFWS] "<" addr-spec ">" [CFWS] /
obs-angle-addr
display-name = phrase

According to the above, an address that includes a display-name
consists of the display name followed by the address within angle
brackets, and the display-name is a "phrase".

Then, you have these definitions:

word = atom / quoted-string
phrase = 1*word / obs-phrase

A phrase has only one word, but a "word" can be a quoted string. An
"atom" is defined so as to include only a limited set of name
characters not including the space.

--
Dan
Jul 20 '05 #15

P: n/a
Harlan Messinger <hm*******************@comcast.net> wrote in message news:<2f********************************@4ax.com>. ..
da*@tobias.name (Daniel R. Tobias) wrote:
To be standards-compliant, there should be quotes around the
human-readable-name portion, since it contains a space;


If it contains a space or if it contains an escape code standing in
for a space?


If it contains a space after the URI escapes are decoded, since the
standard in question is the one for e-mail headers (RFC 2822), not the
one for URIs.

--
Dan
Jul 20 '05 #16

P: n/a
da*@tobias.name (Daniel R. Tobias) writes:
By my reading of RFC 2822: http://www.rfc-editor.org/rfc/rfc2822.txt
the quotes are necessary in the display name if spaces are included.

To see why, you have to untangle a series of BNF definitions:

address = mailbox / group
mailbox = name-addr / addr-spec
name-addr = [display-name] angle-addr
angle-addr = [CFWS] "<" addr-spec ">" [CFWS] /
obs-angle-addr
display-name = phrase

According to the above, an address that includes a display-name
consists of the display name followed by the address within angle
brackets, and the display-name is a "phrase".

Then, you have these definitions:

word = atom / quoted-string
phrase = 1*word / obs-phrase

A phrase has only one word, but a "word" can be a quoted string. An
"atom" is defined so as to include only a limited set of name
characters not including the space.


Check out RFC 2234 <http://www.rfc-editor.org/rfc/rfc2234.txt>,
Section 3.6:

3.6. Variable Repetition: *Rule

The operator "*" preceding an element indicates repetition. The full
form is:

<a>*<b>element

where <a> and <b> are optional decimal values, indicating at least
<a> and at most <b> occurrences of element.

Default values are 0 and infinity so that *<element> allows any
number, including zero; 1*<element> requires at least one;
3*3<element> allows exactly 3 and 1*2<element> allows one or two.

So "1*word" means at least one word, not exactly one word.

Also, RFC 2822 Section 9.1. A.1. ("Addressing Examples") contains
several examples of display names with spaces and no quotation marks.
However, the quotation marks are required if the display name has any
punctuation, including periods, commas, or apostrophes (so names like
"O'Hara" have to be in quotation marks).

--
Dean Tiegs, NEĀ¼-20-52-25-W4
ā€œConfortare et esto robustusā€
http://telusplanet.net/public/dctiegs/
Jul 20 '05 #17

P: n/a
Dean Tiegs wrote:
So "1*word" means at least one word, not exactly one word.

Also, RFC 2822 Section 9.1. A.1. ("Addressing Examples") contains
several examples of display names with spaces and no quotation marks.
However, the quotation marks are required if the display name has any
punctuation, including periods, commas, or apostrophes (so names like
"O'Hara" have to be in quotation marks).


Thanks for the clarification. (However, when I reread the RFC now, it
seemed like the apostrophe was in fact in the list of permitted
characters in an atom, so it might not require quotes around it.)

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Jul 20 '05 #18

P: n/a
"Daniel R. Tobias" <da*@tobias.name> writes:
Dean Tiegs wrote:
So "1*word" means at least one word, not exactly one word. Also,
RFC 2822 Section 9.1. A.1. ("Addressing Examples") contains several
examples of display names with spaces and no quotation marks.
However, the quotation marks are required if the display name has
any punctuation, including periods, commas, or apostrophes (so
names like "O'Hara" have to be in quotation marks).


Thanks for the clarification. (However, when I reread the RFC now,
it seemed like the apostrophe was in fact in the list of permitted
characters in an atom, so it might not require quotes around it.)


Yes, the apostrophe is OK. After I had posted, I realized that I ought
to have checked that fact and not relied on my memory.

--
Dean Tiegs, NEĀ¼-20-52-25-W4
ā€œConfortare et esto robustusā€
http://telusplanet.net/public/dctiegs/
Jul 20 '05 #19

This discussion thread is closed

Replies have been disabled for this discussion.