playing with mailto |
playing with mailto |
cjthom999 |
Sep 15 2009, 01:22 PM
Post
#1
|
Group: Members Posts: 1 Joined: 15-September 09 Member No.: 9,762 |
Please take a look at this code, trying to create an automatic email to set parties in this line, generate a subject line, body of the email and also in the body provide a clickable link. I havent tried running an a href inside of another a href, so I am hitting a speedbump there. I have a feeling once I overcome that, I will find other problems... thoughts?
If I want this to happen automatically, is uing a href the wrong tag? <a href="mailto:blah@gmail.com?subject=Arecont,blah@blahblah.com,blah.blah@blah.net,body=This is where I want my body of the email, click <a href="http://www.blahlblah.flargin.com/" target="_blank">here!</a>,%0A%0AYour Friend Poster"> |
pandy |
Sep 15 2009, 04:55 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
The format is all wrong. It's basically a queary string (as the one you see at the end of the URLs at this forum, look at what you have on the addressbar right now). It's a series of name-value pairs. A question mark begins the query string and the following name-value pairs are prefixed with an ampersand. Like so:
?a=1&b=2&c=3 You can't have markup (tags) in the body of a mailto message. Multiple recipients are quirky in mailto, but I think both the below examples work with most email clients. That said, mailto is always unreliable and the less you try to tag on to it, the better chance you have of it working. Remember that just because it works for you, it doesn't have to work for others. If there's no default email client on the system it of course doesn't work at all. The whole construct is a URL, so spaces and other characters that aren't allowed in URLs must be URL encoded. http://www.blooberry.com/indexdot/html/top...urlencoding.htm Oh, the whole thing is the value of href and should be quoted like one entity. HTML <a href="mailto:blah@gmail.com,blah@blahblah.com,blah.blah@blah.net?subject=Arecont&body=This%20is%20where%20I%20want%20my%20body%20of%20the%20email">click here!</a> HTML <a href="mailto:blah@gmail.com?cc=blah@blahblah.com,blah.blah@blah.net&subject=Arecont&body=This%20is%20where%20I%20want%20my%20body%20of%20the%20email">click here!</a> Also think about that by doing this, you expose not one but three email addresses to spam bots. http://htmlhelp.com/faq/html/links.html#mailto-link http://htmlhelp.com/faq/html/forms.html#mailto-form |
Lo-Fi Version | Time is now: 28th April 2024 - 06:12 AM |