HTML: insert line-break in email subject like %20 is a space?

Issue

<a href="mailto:office@something.com?subject=Whatever%20this%20is &body=HowcanIaddLine<br/>Break here

I wonder if it is possible to write something like %20 (which stands for a space) for a line-break as well. So I want to have separate lines in my body of the e-mail.

Any ideas?

Solution

You should use a carriage return %0D and line feed %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 of generating a line-break.

Answered By – MikroDel

Answer Checked By – Pedro (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.