So I have been making an email sender with this code:
var link = "mailto:example@gmailcom"
+ "?cc=myCC@gmail.com"
+ "&subject=" + encodeURIComponent("Order")
+ "&body=" + encodeURIComponent("Some random send string <br>Some more send string")
;
window.location.href = link;
However, the
tag does not work. Does anyone know how to make a line break?
Because you are encoding the break tag:
encodeURIComponent("Some random send string <br>Some more send string")
// 'Some%20random%20send%20string%20%3Cbr%3ESome%20more%20send%20string'