How to enter line break into mailto body command
Tuesday, April 1st, 2008 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
