Important alert: (current site time 7/15/2013 12:22:13 PM EDT)
 

VB icon

Advanced Mailto:

Email
Submitted on: 4/21/2000 9:54:24 PM
By: G. M. Faggiano  
Level: Beginner
User Rating: By 7 Users
Compatibility: JavaScript
Views: 27128
 
     Ok, we've all seen the tag to open a new mail message with a specified e-mail address ... what's the limitation to this? Simple, you can't modify the subject and body unless you make them a single string of text with no spaces. Javascript is your way around this limitation. Small code, simple to impliment and use.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Advanced Mailto:
' Description:Ok, we've all seen the tag to open a new mail message with a specified e-mail address ... what's the limitation to this? Simple, you can't modify the subject and body unless you make them a single string of text with no spaces. Javascript is your way around this limitation. Small code, simple to impliment and use.
' By: G. M. Faggiano
'
' Side Effects:only works in browsers that support javascript (not much of a limitation).
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=1811&lngWId=14'for details.'**************************************

<SCRIPT language="JavaScript"> 
<!-- 
/* Mailto enhancement by: Fibdev Software, Inc. - Place this in the head of the document */ 
function e_mailer() 
{ 
var e_add= 'cservice@fibdev.com'; 
var subj= 'Your Subject Here!';
var e_body= 'message text goes here ...'; 
window.location="mailto:"+e_add+"?subject="+subj+"&body="+e_body;} 
//--> 
</SCRIPT>
// Place this as the link to your new mailto:
<A HREF="javascript:e_mailer()">Mail Me!</a>
// or ...
<A HREF="javascript:e_mailer()"><img src="images/e-mail.gif"></a>
// Simple and effective.
// enjoy


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

9/29/2000 5:59:23 AMBirgir Thor Halldorsson

href=
(If this comment was disrespectful, please
report it.)
 
12/20/2000 2:35:09 PMPaul

This is a great script, however, not everyone uses outlook. If this is the only way for people to contact you via website, you will lose potential customers or contacts. I looked into doing this, but then went with a free form submition and manipulated it. Response-o-matic.com i think.

(If this comment was disrespectful, please report it.)

 
7/17/2003 11:10:48 PM

i think the reason it opened outlook for you is because you have outlook as your default e-mail application under your internet settings, i have yahoo set and it opened up my yahoo mailer....ORyan
(If this comment was disrespectful, please report it.)

 
3/29/2004 12:40:33 PM

I would like someone to tell me where can i find an html emailer like the one i write on now.
thx
(If this comment was disrespectful, please report it.)

 
7/3/2006 5:40:43 AMsaravanan

send
(If this comment was disrespectful, please report it.)

 
7/25/2008 5:10:06 AMpraveen

wow very good for beginners.
thanks
(If this comment was disrespectful, please report it.)

 
8/21/2011 11:44:29 PMfrancis

i want to have your software for database code example.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.