Mailto: How do I make a pre-formatted email?


play thing
I want to launch a pre-written, formatted email using the "mailto" command.

I know how to create an email with both the subject & the body filled in, but I'm not sure if it is possible to format the body text with line breaks, etc.

Can anybody tell me if this is possible, and how I go about doing it.



[Bobs/Prog/Design:~] mod%
Staff member
Based on what you've said, you might want to look into doing a form on a webpage and using a PHP or similar script to properly format the message.

Getting the body formated off a mailto link isn't possible, at least not in the manner I think you're trying to do.


play thing
Thanks. I already have a cgi form in place on the site, but the client wants me to have a pre-written email as well. Given the amount of text that will be in the body of the email, I think it will look rubbish if it isn't formatted correctly?

I have never come across a formatted email launched as a maito before, but thought under the right circumstances it would be an interesting tool.


play thing
No luck, but thanks anyway Pengu.

However.... Ureka!! I have found the way, and in the interest of shared knowledge here it is..... %0D.

Now, can anybody shed any light on further formatting the text (bold, etc).


Registered Penguin

But be aware that mailto: is a dangerous tag to rely upon:

Note that the way you are doing it (percent-hex is for specifically inserting the ASCII character associated with that hexadecimal value), you *cannot* format the text.

You can insert all kinds of things into it, but you cannot style it.

You should also be aware that %0D is a carriage-return. %0A, a new-line, is preferable. A horizontal tab is %09, if that helps.

A full list is available at (scroll down a little).

As you can see, you can't insert any ASCII character which means "BOLD".

You should look at sending HTML mail or RTF mail, preferably through a form which has a CGI action (so it doesn't require the user to have an installed e-mail application [or have associated a Hotmail address to a Windows account])