[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 02-24-2008, 02:35 PM   #1 (permalink)
New Member
 
xarzu's Avatar
 
Join Date: Apr 2007
Posts: 17
0.00 NP$ (Donate)

xarzu is an unknown quantity at this point


mailto in html

I am trying to use the tag "mailto" in an HTML file to prompt the user to email me. Specifically, I want to have the subject and the body of the email message already filled in when the user sends me the email.

So far, I have managed to have a hyperlink where the body is already filled in:
HTML Code:
<a href="mailto::username@gmail.com?body='test'">this works</a> 
I have also managed to have a hyperlink where the subject line is already filled in:

HTML Code:
<a href="mailto:usernamegmail.com?subject='the subject'">this works too</a> 
But I have yet to figure out how do combine the two:
HTML Code:
<a href="mailto::username@gmail.com?subject='the subject and
the body'?body='test'">help</a> 
Does anyone know how to do this?
__________________
There is nothing stronger than human will. Nothing can stop it.
xarzu is offline  
Old 02-24-2008, 02:44 PM   #2 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
It should be.

HTML Code:
<a href="mailto://username@gmail.com?subject=the%20subject%20and%20the%20body&body=test">help</a> 
Ensure you url encode the subject and the body. You also do not need to enclose it like you had in single quotes.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 02-24-2008, 02:47 PM   #3 (permalink)
NamePros Member
 
Join Date: Feb 2008
Posts: 69
1.25 NP$ (Donate)

drjeff is an unknown quantity at this pointdrjeff is an unknown quantity at this point


<html>
<body>
<a href=mailto:username@emailprovider.com?subject=web-site-inquiry&body=this>Contact Us</a>
</body>
</html>

Last edited by drjeff; 02-24-2008 at 02:50 PM.
drjeff is offline  
Old 02-24-2008, 03:58 PM   #4 (permalink)
NamePros Regular
 
Richard's Avatar
 
Join Date: Jan 2006
Posts: 561
10.20 NP$ (Donate)

Richard is a name known to allRichard is a name known to allRichard is a name known to allRichard is a name known to allRichard is a name known to allRichard is a name known to all

Save a Life Tsunami Relief AIDS/HIV Save a Life
Code:
<a href="mailto:usernamegmail.com?subject=the%20subject&body=the%20body">Contact</a>
__________________
"Failure is not the only punishment for laziness; there is also the success of others."
Richard is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 03:42 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85