The format for the URL is:
<a href="mailto:YourName@YourSite.com? cc=someone@YourSite.com&bcc=someoneElse@YourSite.com &subject=Shipping%20Information%20Request&body=Please%20tell%20me%20if%20my%20order%20has%20shipped!">Shipping Request</a>
As you can see the spaces need converting to %20 and if I want new lines in the body I have to replace the CRLF to %0D%0A
I can use the map filter to convert the spaces and line ends but how to I ensure that the filter only get applied to part of the original text?
The text below is generated by a mail merge and can be changed if required.
The original text is:
Subject:The subject of the e-mail
Body:The body with a new line
and one more
and another with an e-mail address email@example.com
Link:Click here to send
What I need output is:
Code: Select all
<a href="mailto:First.Last@YourSite.com? subject=The%20subject%20of%20the%20e-mail&body=The%20body%20with%20a%20new%20line%0D%0Aand%20one%20more%0D%0Aandfirstname.lastname@example.org">Click here to send</a><p>
Any help would be appreciated, David