A client wanted to have an email link, which would open Outlook and populate some of the email with boilerplate text. This was for an intranet, so email address security wasn’t an issue — I knew I could use a simple mailto link. Easy.
Except that I wanted some line breaks between parts of the message body. A bit of Googling and I found a solution that works! Here’s the syntax…
- Link to email address: mailto:firstname.lastname@example.org (where you substitute ‘email@example.com’ with the real email address)
- Subject line: ?subject=Subject line (substitute ‘Subject line’ with the real subject)
- Message: &body=Message (substitute ‘Message’ with the real message)
- Line breaks in the message body: %0A (that’s a zero, not an ‘O for orange’); use %0A%0A for two line breaks, %0A%0A%0A for three line breaks etc.)
Here’s an example:
Mailto syntax example
And here’s how it looks in Outlook:
How it looks in Outlook
Please note: You can only have one ? in the string, so if you need to pre-populate the CC field, the Subject field, and the message body then do it like this:
Also, populating the Message Body will overwrite any automatic signature you have in Outlook. You will have to re-insert your signature manually.