mailto in html

  • Bill_Thompson
  • Student
  • Student
  • User avatar
  • Joined: Jun 24, 2005
  • Posts: 73
  • Status: Offline

Post February 24th, 2008, 1:02 pm

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:
Code: [ Select ]
<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:

Code: [ Select ]
<a href="mailto:usernamegmail.com?subject='the subject'">this works too</a>


But I have yet to figure out how do combine the two:
Code: [ Select ]
<a href="mailto::username@gmail.com?subject='the subject and
the body'?body='test'">help</a>
  1. <a href="mailto::username@gmail.com?subject='the subject and
  2. the body'?body='test'">help</a>


Does anyone know how to do this?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 24th, 2008, 1:02 pm

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6129
  • Loc: Seattle, WA
  • Status: Offline

Post February 24th, 2008, 3:06 pm

& :wink:

Code: [ Select ]
<a href="mailto:username@gmail.com?subject='the subject'&body='the body'">help</a>


You might want to consider using a contact form rather than an email link as posting your email address on the Web is just asking for spam.
  • typhon
  • Guru
  • Guru
  • User avatar
  • Joined: Oct 25, 2004
  • Posts: 1294
  • Loc: Memphis, Tn
  • Status: Offline

Post February 25th, 2008, 9:49 am

I totally agree with spork. A friend of mine was getting gobs and gobs of spam from his site. and when I removed his email from his site and put a few filters for the previous spam, the amount has been vastly (i mean by the 1000s) reduced in just a couple of weeks.

A contact form is the way to go. But you also need to set up some filters for the form so the spamers cant hijack your form and make it look like you send spam.
-- Never hold a cat and a hairdryer at the same time.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 04, 2007
  • Posts: 659
  • Loc: USA
  • Status: Offline

Post February 25th, 2008, 5:03 pm

you could try java obfuscication (sp?) and still have a text link if you need to have it by a hyperlink. But a form is the best way to go.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6129
  • Loc: Seattle, WA
  • Status: Offline

Post February 25th, 2008, 7:08 pm

Java obfuscation? I don't think Java is really necessary for this.
The Beer Monocle. Classy.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 04, 2007
  • Posts: 659
  • Loc: USA
  • Status: Offline

Post February 26th, 2008, 7:01 am

It cut back the spam at work dramatically when they insisted on using hyperlinks and not contact forms. I did use a combination of both but it did cut down on spam ....

You concatinate the string with java script so it theoretically can't be read and looks like giberish to the computer if they are reading the source code of the pages.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6129
  • Loc: Seattle, WA
  • Status: Offline

Post February 26th, 2008, 10:05 am

Oh, Javascript. You said Java.
The Beer Monocle. Classy.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 04, 2007
  • Posts: 659
  • Loc: USA
  • Status: Offline

Post February 26th, 2008, 1:09 pm

I am slow ... I confuse the two often ... heh.

Sometimes the web master / developer has control of what the design is and sometimes they don't. All depends on the work environment. :)
  • kitcorsa
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Mar 05, 2007
  • Posts: 122
  • Status: Offline

Post March 4th, 2008, 3:07 am

use a contact form and hide your email address. there are 10000 of spiders/bots out there that just go through the interent looking for email address to sell onto 3rd part companies to spam you with advertising emails!!!

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 127 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.