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

mailto: tags?

P: n/a
Val
Any experts on mailto: tags?

I want to set a link so that the subject and some of the body of the
email is filled in. This is easy for simple text, although you need to
use %20 for spaces:

<a href="mailto:no****@nowhere.com
?subject=Your web site
&body=This%20is%20the%20%body!">
click here</a>

I want to pre-format the body text, like this:

Name: |
Address: |
Postcode: |
Email: |

[The | are just to show that I've added tabs]

I've tried all the expected things, like %13 or %0A, but I just get a
blob in the text.

Can it be done?

Jul 20 '05 #1
Share this Question
Share on Google+
15 Replies

P: n/a


Val wrote:
I want to set a link so that the subject and some of the body of the
email is filled in. This is easy for simple text, although you need to
use %20 for spaces:

<a href="mailto:no****@nowhere.com
?subject=Your web site
&body=This%20is%20the%20%body!">
click here</a>

I want to pre-format the body text, like this:

Name: |
Address: |
Postcode: |
Email: |

[The | are just to show that I've added tabs]


<a
href="mailto:no****@nowhere.com?subject=Your%20web %20site&amp;body=Name:%09%0D%0AAddress:%09%0D%0APo stcode:%09%0D%0AEmail:%09%0D%0A">click
here</a>

Thor

--
http://thorweb.anta.net/
Jul 20 '05 #2

P: n/a
Val <va******@hotmail.com> wrote:
Any experts on mailto: tags?
No, because there's no such thing. But we know what you mean.
I want to set a link so that the subject and some of the body of the
email is filled in. This is easy for simple text, although you need to
use %20 for spaces:

<a href="mailto:no****@nowhere.com
?subject=Your web site
&body=This%20is%20the%20%body!">
click here</a>
1. You need to escape the & as &amp;
2. Why use %20 for spaces some of the (in your body) but not all of
the time (in your subject)?
3. It's unreliable, depending on the browser and e-mail client (if
any!) that the user has. Do you want to actually receive these emails
or are you happy for a percentage of the to drop into a black hole?
I want to pre-format the body text, like this:

Name: |
Address: |
Postcode: |
Email: |


Now why would you want to create an e-mail like that? Are you
expecting the user to then put in their details at the correct points?

Perhaps you should be looking at using a form, which is much more
reliable and can send you the results with whatever formatting you
desire.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
Val wrote:
Any experts on mailto: tags?
This is not an html question, so the help you get here may not be as
good as it would be in other groups.
I want to set a link so that the subject and some of the body of the
email is filled in.


This is unsupported. Trying it risks the mailto: link not working at
all. Of course, no mailto: link will work when the client has no
email program installed.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4

P: n/a
Brian wrote:
Val wrote:
Any experts on mailto: tags?


This is not an html question, so the help you get here may not be as
good as it would be in other groups.


actually the answer is an html answer...as Steve Pugh has already
explained this is a case for a form
I want to set a link so that the subject and some of the body of the
email is filled in.


This is unsupported. Trying it risks the mailto: link not working at
all. Of course, no mailto: link will work when the client has no
email program installed.


the big problem in what is being attempted is to use "click here" as the
anchor text...using the email address would at least allow it to be copied
and pasted into an email client...however the additional requirements
would be better served by using a form

--
eric
www.ericjarvis.co.uk
all these years I've waited for the revolution
and all we end up getting is spin
Jul 20 '05 #5

P: n/a
Greetings.

In article <3h********************************@4ax.com>, Val wrote:
<a href="mailto:no****@nowhere.com
?subject=Your web site
&body=This%20is%20the%20%body!">
click here</a>


Someone correct me if I'm wrong, but isn't the "?subject=foo&body=bar"
syntax non-standard? If so, then any solution you find isn't guaranteed to
work on all conforming browsers anyway.

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Jul 20 '05 #6

P: n/a


Tristan Miller wrote:
Someone correct me if I'm wrong, but isn't the "?subject=foo&body=bar"
syntax non-standard?


You're right; RFC 2368 is a *proposed* standard.

Thor

--
http://thorweb.anta.net/
Jul 20 '05 #7

P: n/a
Eric Jarvis wrote:
Brian wrote:
Val wrote:
Any experts on mailto: tags?


This is not an html question, so the help you get here may not be as
good as it would be in other groups.


actually the answer is an html answer...as Steve Pugh has already
explained this is a case for a form


Well, yes, the answer is html. :-)

--
Brian
follow the directions in my address to email me

Jul 20 '05 #8

P: n/a
In article <eIifb.488697$cF.171145@rwcrnsc53> in
comp.infosystems.www.authoring.html, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
Val wrote:
Any experts on mailto: tags?


This is not an html question, so the help you get here may not be as
good as it would be in other groups.


I'm curious. Which "other groups" do you think would be more
appropriate?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #9

P: n/a
Stan Brown wrote:
In article <eIifb.488697$cF.171145@rwcrnsc53> in
comp.infosystems.www.authoring.html, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
Val wrote:
Any experts on mailto: tags?


This is not an html question, so the help you get here may not be as
good as it would be in other groups.


I'm curious. Which "other groups" do you think would be more
appropriate?


I dunno. I don't participate them. :) I found comp.mail.headers.
Seems like a stretch, that one. How about ciwa.misc? Or the mail
groups to see if any will operate the way the op wants. Perhaps
ciwa.site-design makes more sense, but then, that tends to include all
the usual suspects from ciwah.

I'm staring to think I spoke too soon in making that suggestion. Can
I retract that statement?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #10

P: n/a
Brian wrote:
Stan Brown wrote:
In article <eIifb.488697$cF.171145@rwcrnsc53> in
comp.infosystems.www.authoring.html, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
Val wrote:

Any experts on mailto: tags?

This is not an html question, so the help you get here may not be as
good as it would be in other groups.


I'm curious. Which "other groups" do you think would be more
appropriate?


I dunno. I don't participate them. :) I found comp.mail.headers.
Seems like a stretch, that one. How about ciwa.misc? Or the mail
groups to see if any will operate the way the op wants. Perhaps
ciwa.site-design makes more sense, but then, that tends to include all
the usual suspects from ciwah.

I'm staring to think I spoke too soon in making that suggestion. Can
I retract that statement?


no...the t-shirts are already being printed and the TV documentary is in
pre-production...sorry

:)

--
eric
www.ericjarvis.co.uk
all these years I've waited for the revolution
and all we end up getting is spin
Jul 20 '05 #11

P: n/a
Eric Jarvis wrote:
Brian wrote:
I'm staring to think I spoke too soon in making that suggestion. Can
I retract that statement?


no...the t-shirts are already being printed and the TV documentary is in
pre-production...sorry

:)


See? That's why I hate marketers.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #12

P: n/a
Val
In comp.infosystems.www.authoring.html, Steve Pugh wrote:
Now why would you want to create an e-mail like that? Are you
expecting the user to then put in their details at the correct points?

Perhaps you should be looking at using a form
I've got a form, but some people can't use it because of firewalls etc.

In comp.infosystems.www.authoring.html, Thor Kottelin wrote:
<a
href="mailto:no****@nowhere.com?subject=Your%20we b%20site&amp;body=Name:%09%0D%0AAddress:%09%0D%0AP ostcode:%09%0D%0AEmail:%09%0D%0A">click
here</a>


Brilliant, although the tabs don't work - I can live with that.

Thank you.

--
Nigel Mercier

Please remove NOSPAM from my return address
Jul 20 '05 #13

P: n/a
Val <va******@hotmail.com> wrote:
In comp.infosystems.www.authoring.html, Steve Pugh wrote:
Now why would you want to create an e-mail like that? Are you
expecting the user to then put in their details at the correct points?

Perhaps you should be looking at using a form
I've got a form, but some people can't use it because of firewalls etc.


A firewall that lets users visit web pages and send e-mails to
external addresses but which doesn't allow form submissions? That
sounds unlikely.
In comp.infosystems.www.authoring.html, Thor Kottelin wrote:
<a
href="mailto:no****@nowhere.com?subject=Your%20w eb%20site&amp;body=Name:%09%0D%0AAddress:%09%0D%0A Postcode:%09%0D%0AEmail:%09%0D%0A">click
here</a>


Brilliant, although the tabs don't work - I can live with that.


As I said in my post, that's only a solution if you are willing to
have a portion of the emails disappear into a black hole. I hope
you're not using this for business.

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #14

P: n/a
One more time:

<a
href='mailto:da****@atreide.net?Subject=Hi%20There &Body=This%20is%20a%20body
&Att:filename="FileName.TXT"'>attachement, attachment, attch, att</a>

-------
Eric Miller's User Tips

Last Updated on 09/21/98

OE as Default Mail Client If you simply want to send a mail
message, but don't want to fully load OE, select Start | Run | "mailto:"
(without the quotation marks). This will bring up a Compose Message window
with the cursor blinking in the To: field, ready for you to change. You can
even create a shortcut wherever you would like. In the Target box under the
Shortcut tab, type in "mailto:" (without the quotation marks). Having done
this, clicking on the shortcut will bring up an OE Compose Message window.
For more information, read Knowledge Base Article Q181985.

Now, if you'd like to automatically fill in some of the fields, you
can do that too. For example, iIf you want to fill in the To field, using
the address of ab*@isp.com as an example, simply type in
"mailto:ab*@isp.com" (again without the quotation marks). If you want the
Compose Message window to pop up with ab**@isp.com in the To field,
ab**@isp.com and ab**@isp.com in the CC field, ab**@isp.com and ab**@isp.com
in the BCC field, the word "Stuff" in the Subject field and the word "Text"
in the body of the message, use:
mailto:ab**@isp.com?subject=Stuff&CC=ab**@isp.com; ab**@isp.com&BCC=ab**@isp.com;ab**@isp.com&body=Te xt

A couple of caveats are particularly noteworthy about using mailto
with command line parameters. First, the syntax must be precise -- a "?" is
required to setoff the Subject field, an "&" is required to set off the CC,
BCC and Body fields. Second, OE will stop picking up the command line
instructions when it first encounters a blank space in the command string.
This can have unintended and confusing consequences. For instance, if you
have a Subject with more than one word and you have a space between the
words, the Subject field will reflect only the first word. Moreover, any
instructions after the blank space, e.g., BCC, CC or Body will not be picked
up. To deal with multiple words in the Subject and Body fields, you need to
be sure to enclose the multiple words within quotation marks. These
quotation marks will show, but OE will also pick up the entire subject and
any ensuing instructions. With respect to multiple email addresses in the
To, BCC or BCC fields, you need to be sure to separate them with semicolons,
but there should be no additional spaces. That's all there is to it. Once
you understand the multiple word limitations, the mailto command can be very
handy.
-----------------------
Jul 20 '05 #15

P: n/a
"Jean Pierre Daviau" <jp******@videotron.ca> exclaimed in <Ll******************@weber.videotron.net>:
One more time:
And for the Nth time:

This:
<a
href='mailto:da****@atreide.net?Subject=Hi%20There &Body=This%20is%20a%20body
&Att:filename="FileName.TXT"'>attachement, attachment, attch, att</a>


will lead to mail being lost. Do. Not. Do. This. unless you want to loose
mail and make life hard on your users.

--
- Tina Holmboe Greytower Technologies
ti**@greytower.net http://www.greytower.net/
[+46] 0708 557 905
Jul 20 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.