HTML: enable line break in the subject line, for example,% 20 - is this a space?

BreakHere ...

I wonder if it is possible to write something like %20 (which denotes a space) to break the line. Therefore, I want to have separate lines in my body of the letter.

Any ideas?

+17
html email
Feb 22 '13 at 8:18
source share
2 answers

You must use carriage return %0D and line %0A

 <a href="mailto:endpointadress@something.com?cc=endpointadress2@something.com&subject=your subject&body=Text before new line.%0D%0AText after new line.">create email</a> 

This is defined in RFC2368 and is the only valid method for generating line breaks.

+26
Feb 22 '13 at 8:30
source share
— -

Replace \n (and \r\n ) with %0D%0A as specified by RFC6068 (in section 5 ) updated mailto URI Scheme from October 2010 (instead of RFC2368 ).

[...] line breaks in the message body MUST be encoded using "%0D%0A" .
Implementations MAY add the final line break to the message body even if the body does not have "%0D%0A" [...]

This is an example from the RFC (in section 6 )

 <mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index> 

The above mailbox corresponds to:

 send current-issue send index 
+3
Nov 27 '14 at 15:18
source share



All Articles