Tuesday 16 March 2010
Mailto: Syntax
Quick reference on what options are available with mailto:
Syntax
<a href="mailto:addresslist?optionlist">click here</a>
where addresslist is a comma-separated list of email addresses, and
optionlist is a &-separated list of the following options:
cc=
bcc=
subject=
body=
Inside the body use %0A for a new line.
Examples
Simple
<a href="mailto:test@test.com">
Multiple Addresses
<a href="mailto:test1@test.com, test2@test.com">
Cc Address
<a href="mailto:test1@test.com?cc=test2@test.com">
Subject
<a href="mailto:test1@test.com?subject=Email Testing">
Subject + Body
<a href="mailto:test1@test.com?subject=Email Testing&body=This is a test email">
Cc + Subject + Body
<a href="mailto:test1@test.com?cc=test2.com&subject=Email Testing&body=This is a test email">
Be aware there is a 500 character limit for the whole href, including 'mailto:'...
Next article: PHP Mail Delivery and Read Receipts (09 April 2010)
Next Websites article: Browser Comparison (31 August 2010)
--- Posted in Websites and viewed 8,897 times ---