A standard mailto: link looks like this:

mailto:test@force24.co.uk

Example

Pretty simple. When you click that link, it opens up the user’s default mail program, and will populate test@force24.co.uk in the TO field.

mailto: link with subject line

mailto:test@force24.co.uk?subject=this%20is%20a%20subject

Example

This would send an email to test@force24.co.uk with the subject line of “this is a subject”

mailto: link CC & BCC fields

NOTE: As soon as you add a 2nd parameter (“subject” was our first parameter, now we’re adding “cc” and “bcc”), you need to separate all your parameters with an ampersand (&). You begin your parameters, after the mailto:test@force24.co.uk, with a question mark (?), but use ampersands (&) to separate parameters after that.

Adding CC & BCC fields is as simple as adding a subject.

mailto:test@force24.co.uk?subject=this%20is%20a%20subject&cc=test-cc@force.co.uk&bcc=test-bcc@force24.co.uk

Example

Adding multiple emails for these fields would look like this:

mailto:test@force24.co.uk?subject=this%20is%20a%20subject&cc=test-cc@force.co.uk,test-cc2@force24.co.uk&bcc=test-bcc@force24.co.uk

Example

mailto: adding body content

Adding a message in the email body. Again, it’s just as easy as before, but be careful of your character encodings. We are using the body parameter. Here’s an example of a mailto: link with subject, body, cc & bcc fields.

mailto:test@force24.co.uk?subject=this%20is%20a%20subject&cc=test-cc@force.co.uk,test-cc2@force24.co.uk&bcc=test-bcc@force24.co.uk&body=this%20is%20a%20piece%20of%20body%20copy

Example

Common character encodings

  • space = %20
  • line break / carriage return = %0D%0A
  • question mark = %3F
  • forward slash = %2F
  • colon = %3A


If you would like any assistance with this please don't hesitate to contact your Account Manager!

Did this answer your question?