Insert HTML formatting into email body using Suitescript
P粉038161873
P粉038161873 2023-09-09 20:41:10
0
1
417

I have written a script that will send an email alert if a certain type of product is missing from a quote.

Very simple and clear.

Now I just want to include some basic information in the email like sales rep and department.

I know I can use repName etc like below.

However, when I do this, there are no spaces and everything is on one line. So I want to do some basic formatting, line wrapping, field labels.

But if I put repName or itemDivision between quotes, they appear as plain text instead of variable values.

How do I insert variables into the email body for formatting? I'm assuming I have to surround it with some kind of tag?

Can't find this information anywhere.

Not interested in any complex rendering techniques or writing a million lines of code. The information is already there, I just want to include it in a slightly friendlier way.

Thanks

log.debug({
    title: 'Line Item Division',
    details: itemDivision
});

if (itemDivision !== 'Media') {

    email.send({
        author: ** ** ,
        recipients: 'an email address',
        subject: 'Quote Without Media',
        body: "A Test" + itemDivision + repName

    });
}
}

P粉038161873
P粉038161873

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!