This article was been published more than a year ago. The information may be outdated.
If you’ve ever written a website in HTML, you are probably familiar with the MailTo-command, used to automatically start a new email message when the link is clicked. However, you can do so much more with the command. Here are some examples:
- Address message to multiple recipients
- Add entry in the “Subject” field
- Add entry in the “Copy To” or “CC” field
- Add entry in the “Blind Copy To” or “BCC” field
- Add entry in the “Body” field
Now, I’m sure you’re wondering how exactly we get the code to do this. Here’s how (click the link to see the effect):
- Simple MailTo
- <a href=”mailto:[email protected]”>
- MailTo with Multiple Recipients
- <a href=”mailto:[email protected],[email protected]”>
- MailTo with Subject
- <a href=”mailto:[email protected]?subject=Comments from website”>
- MailTo with a Copy
- <a href=”mailto:[email protected][email protected]”>
- MailTo with a Blind Copy
- <a href=”mailto:[email protected][email protected]”>
- MailTo with message already started in Body
- <a href=”mailto:[email protected]?body=I am having trouble finding information on “>
- MailTo with multiline message in Body
- <a href=”mailto:[email protected]?body=The message’s first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph.”>
- NOTE: Use “%0A” for a new line, use “%0A%0A” for a new line preceded by a blank line.
Of course, you can also combine the effect:
- MailTo with Subject, a Recipient, a Copy and a Blind Copy
- <a href=”mailto:[email protected]?subject=MailTo Comments&[email protected]&[email protected]”>
Be First to Comment