search
Japanese Chinese Nederlands Espanol Italiano Deutsch Francais Twitter Rss Feeds
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

Web ProgrammingArticlesForumsFAQs
JavaScript
ASP
ASP.NET
Web Services

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Operating SystemsArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

html mailto attribute usages


By shaibu chacko
Printer Friendly Version
View My Articles
47 Views
    

This example allows developer to email their application users from the accessed website using mailto HTML attribute in a Anchor tag.


As we all know that the mailto attribute using in the <A> tag
Example:
<a href="mailo:abc@domain.com">test</A>
And including the subject in the mail message is as follows.
Example:
<a href="mailo:abc@domain.com?subject=test subject">test</A>
The following example opens a Email dialog, where the subject and body of the email are filled with contents we have specified in the mailto attribute.
In this we have to specify the recipients emails id's when the Email dialog opens.
Example:
<A href="mailto:?subject=Error has occurred &body=Hi, This error has occurred during the processing of X operation in the application">Contact Admin</A>
The following example opens a Email dialog with the two email id's in the TO, one email ID in CC and one email Id in the BCC email ID entry section, where the subject and body of the email are filled with contents we have specified in the mailto attribute.
In this case the emails are sent to all the recipients specified in the TO,CC and BCC email id entry section.
Example:
<a href="mailto:abc@domain.com, abcd@domain.com?subject=Report viewer error&cc=xyz@domain.com&bcc=clientid@domain.com">Contact Admin</A>


button
Article Discussion: html mailto tag usages
shaibu chacko posted at Thursday, June 18, 2009 1:53 AM
Original Article
 

Spaces in the subject= won't show up
Robbe Morris replied to shaibu chacko at Thursday, June 18, 2009 8:42 AM

you need to encode those spaces with the required special characters.  If memory serves, it is something like 

%20 for a space and %d for new lines.