Hey you all!
I must have lost my head today but I am trying to insert a plain link in the body argument of a SendGrid function in Wix Code.
// create the link here
let pdfUrl = 'https://pdfmyurl.com/api?license=MY-LICENSE&url=https://andreaskviby.wixsite.com/CLIENTS/myquote/'+item._id+'&page_size=A4&orientation=portrait';
pdfUrl = encodeURI(pdfUrl); // Tried without this, no difference
const subject = `New Lead from ${item.firstName}`;
const body = `Dear ${item.firstName}}
\rThank you for requesting a quote from us on products. Attached to this e-mail is your quote. Just click the link below.
\rLink: ${pdfUrl}
\rBest regards\r\rWix Show`;
const fromemail = item.email;
sendEmail(subject, body, fromemail)
.then(response => console.log(response));
If I just send the mail without the pdfUrl it works great but as soon as I add it it breaks the link to the link gets cut after the licensekey just before the first &.