Customising a mailto link in HTML

A mailto link is a controversial one, especially in email marketing – but we all have used it and will use it even though we know that it is not 100% bulletproof or that it can’t be tracked (some things are out of our control…).

I sometimes get asked to edit the link with not only adding a subject line but also including a pre-written body copy in that email reply. So, I’ll put it out there for all who may need it.


To add a subject line to a mailto link in HTML add in the ?subject=your subject

Please email me at ?subject=This is my subject line”>email@domain.com

I also find %20 being used for spaces too.

Please email me at email@domain.com

Now, a step further – let’s add some body text here by adding &body=

Please email me at %20is%20my%20subject%20line&body=Thank%20you”>email@domain.com

Also, use the HTML code for ampersand, question mark, equal signs, double quotes – otherwise you might break the code.

A useful tip: I use %0D%0A to add in a paragraph break in the body copy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: