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

thanks a lot.. this is what I need..been searching how to make a line break..:)
thank you – i used you body comments right away here.
I was looking for the breaks in the body and I found it here! Thanx!
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.
Awesome! I’m just starting out with HTML and was really curious how to accomplish this! Thanks a lot!
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.
Thanks
Pingback: garywaddell.com | mailto: Adding Line Breaks in the Body
Thank you!
Thank you very much..This is what i really want..
is there a way to put links inside the body copy?
Thanks!
simple and working
Thanks so much! Just what I needed to create a simple form via mailto
Hero
thanks
%0D%0A is not working with default yahoo mail client
I thought this was correct but it doesn’t work. Could it be the newer yahoo doesn’t allows html scripted subjects to be entered? I can add html symbols but now line breaks. Any suggestions?
Thanks! Helped a lot!!
Thanks so much
, the mail definitly looks better ! ! !
Thank you very much for the post..
Thank you ever so much for taking a few minutes to put this code out there.
I have just used in in a mailer and the %0D%0A code is working perfectly
Thank you
Thank you, Thank You, Thank you.
I’ve been trying to do this far days.
Worked great. Thanks
Also works in Google spreadsheets with a mailto hyperlink containing multiline content generated by concatenating a rectangular range of cells.
Although the hyperlink is dirty (I made no effort for proper entity escaping or even quoting) it seems to work so far, at least on Linux when clicking on the link using Firefox which calls Thunderbird for the actual mail generation.
Super helpful, adds professionalism to my mailto’s.
Thanks!
Thanks so much for this we have been looking for it for a while Thanks !
really helpful! thanks a lot.
Thank you, that’s really helpful.
The beauty of Internet, need something and here we go on a 5 years old website with the best answer.