How to enter line break into mailto body command
Guess no one asked me this before and I didn’t run into this question yet. However, today I got approached with the question how line breaks can be entered in a mailto: command.
The answer can be found in RFC 2368 whereas line breaks in the body of a message must be encoded using the %0D%0A sequence, which in case is nothing else then hexadecimal for 10 (line feed) and 13 (carriage return).
A full mailto: command using this feature could look like this:
mailto:name@domain.e_t?subject=Header&body=This is the first line%0D%0AThis is the second
Strictly speaking should the white spaces also be replaced with the appropriate ASCII code which is %20 and makes the complete command to look like this:
mailto:name@domain.e_t?subject=Header&body=This%20is...
%20the%20first%20line%0D%0AThis%20is%20the%20second

October 29th, 2008 at 5:38 pm
thanks a lot.. this is what I need..been searching how to make a line break..:)
November 22nd, 2008 at 10:56 am
thank you – i used you body comments right away here.
July 15th, 2009 at 9:38 pm
I was looking for the breaks in the body and I found it here! Thanx!
August 1st, 2009 at 7:50 pm
This came as the top search result in google when I searched for “enter in mailto” and it truely deserves it. Thanks a lot….used this instantaneously.
July 30th, 2010 at 7:01 am
Awesome! I’m just starting out with HTML and was really curious how to accomplish this! Thanks a lot!
September 23rd, 2010 at 10:51 pm
Hi,, It works fine with IE6 browser installed on my machine. But If IE8 is installed then every thing comes in single line without any line break.
September 28th, 2010 at 3:13 pm
Thanks
November 12th, 2010 at 8:56 am
[...] http://www.cubetoon.com/2008/how-to-enter-line-break-into-mailto-body-command/ [...]
January 13th, 2011 at 5:40 am
Thank you!
March 24th, 2011 at 7:06 pm
Thank you very much..This is what i really want..
September 30th, 2011 at 7:09 am
is there a way to put links inside the body copy?
October 27th, 2011 at 8:46 pm
Thanks!
simple and working
November 3rd, 2011 at 7:17 am
Thanks so much! Just what I needed to create a simple form via mailto
November 19th, 2011 at 2:28 am
Hero
thanks
January 17th, 2012 at 10:09 pm
%0D%0A is not working with default yahoo mail client