mailto in html

  • Bill_Thompson
  • Student
  • Student
  • User avatar
  • Posts: 77

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

& :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
  • Posts: 1294
  • Loc: Memphis, Tn

Post 3+ Months Ago

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.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

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
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

Java obfuscation? I don't think Java is really necessary for this.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

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
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

Oh, Javascript. You said Java.
  • kbergmann
  • Expert
  • Expert
  • User avatar
  • Posts: 659
  • Loc: USA

Post 3+ Months Ago

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
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

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: ScottG and 64 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.