Tuesday 16 March 2010

Mailto: SyntaxMailto: Syntax

Left QuoteQuick 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:'...Right Quote

Next article: PHP Mail Delivery and Read Receipts (09 April 2010)

Next Websites article: Browser Comparison (01 September 2010)

CommentsComments

Add your comments

Name

Comments

Question

7 + 7 = (this security question stops automated submissions)