Become a HubSpot power user — join us for HubSpot Training Day 2017.

COS-Pages-Editor

How do I create a mailto link?

Last updated: August 22, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A

Starting a hyperlink with mailto: instead of http: tells the browser that it should compose an email in the visitor's default email program on their computer. There are two ways to insert a mailto link into a HubSpot page or email: by inserting a hyperlink into the rich editor or inputting into the source code.


Option #1: Insert a mailto link as a hyperlink via the rich text editor menu

  • Highlight the text or click on the image you wish to apply the mailto link to for your contacts/visitors to click on
  • Click InsertLink.
  • Enter mailto:example@email.com (replace 'example@email.com' with the email address you wish to be entered into the "To" line in your contact's email program) into the Link URL field.
    • To add a CC or BCC, append ?cc=example@email.com or ?bcc=example@email.com.
    • To add a subject line, append the following to the email address: ?subject=Email%20Subject  i.e. mailto:example@email.com?subject=Email%20Subject
    • To add body text, append the following to the subject line: &body=Body%20Text  i.e. mailto:example@email.com?subject=Email%20Subject&body=Email%20Body%20Text
  • Click Add link to finish.

Option #2: Insert a mailto link into the Source Code

  • Access the Source Code by editing a rich text module and clicking Tools Source Code.
  • Find the place in the code where you wish to insert the link, and insert the following code: <a href="mailto:example@email.com">your anchor text</a>  (replace 'example@email.com' with the email address you wish to be entered into the "To" line in your contact's email program and "your anchor text" with the text you wish to be clickable by your contact/visitor).
    • To add a CC or BCC, append ?cc=example@email.com or ?bcc=example@email.com.
    • To add a subject line, append the following to the email address: ?subject=Email%20Subject i.e. <a href="mailto:example@email.com?subject=Email%20Subject">your anchor text</a>
    • To add body text, append the following to the subject line: &body=Body%20Text i.e. <a href="mailto:example@email.com?subject=Email%20Subject&body=Email%20Body%20Text">your anchor text</a> 
  • Click Save to finish then Publish or Update your page.

Please note that you must use "%20" in place of any spaces in your subject line and body text.

Add a question mark after the mailto: link to append elements, and an ampersand between any additional elements: mailto:example@email.com?cc=other@domain.com&subject=Email%20Subject

Was this article helpful?