Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7,C#
Expertise: beginner
Sep 21, 2002

Preload subject and body when offering an email URL

You can easily add a link in your ASP and ASP.NET pages that, when clicked, runs the default mail program (e.g. Outlook) and allows the user to send a message to the email address you provide:
<a href=mailto:someone@yoursite.com>Click here to send a message</a>
Interestingly, you can preload other fields in the email message by appending arguments to the query string:
<a href="mailto:someone@yoursite.com?subject=Request for assistence
&body=Enter the description of the problem here">
Click here to ask for tech support</a>
Here's how the above link appears to users. Click on it to see what happens in your mail program:

Click here to ask for tech support

You can also use the CC and BCC fields, as in:

<a href="mailto:someone@yoursite.com?subject=Request for assistence
&body=Enter the description of the problem here
&cc=helpdesk@yoursite.com&bcc=theboss@yoursite.com">
Click here to ask for tech support</a>
Notice that all the links above should be entered on a single HTML line.
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date