/
How to Format Emails via api.sendEmail
How to Format Emails via api.sendEmail
The sendEmail
function requires three string parameters: the recipient's email address, the subject of the email, and the message of the email.
sendEmail(String to, String subject, String message)
The email can be formatted via HTML tags and can contain Groovy variables.
Example
def user = quote.createdByName def u = api.find("U", Filter.equal("loginName", user)) def email = u.email[0] def url = "https://qa.pricefx.eu/priceFxWeb.html?targetPage=priceShopPage&targetPageState=" + quote.typedId + "" api.sendEmail(email, "Pricefx Quote - " + customerName + " - " + vendorPart + "", "" + customerName + " ordered " + vendorPart + " at quantity of " + actualQuantity.toInteger() + ". This is below committed quantity of " + quotedQuantity + " with tolerance. " + "<br><br>" + "<a href=" + url + ">View Quote</a>")
, multiple selections available,
Related content
Detail Page Layout and Dynamic Tabs
Detail Page Layout and Dynamic Tabs
Read with this
pfx-smtp:send
pfx-smtp:send
More like this
Publishing Templates - Handbook
Publishing Templates - Handbook
Read with this
pfx-smtps:send
pfx-smtps:send
More like this
How to Schedule Jobs with Dependencies
How to Schedule Jobs with Dependencies
Read with this
Message Templates Editor
Message Templates Editor
More like this
Found an issue in documentation? Write to us.