Create table in email body using X++ code.
Views (34)
Hi All,
Today we are going to see how to create table in email body without using email templates. Please refer below example.
Note - Please make sure your email parameter setup is done and you able to send test email.
X Code
internal final class TestJobTableInEmailBody
{
public static void main(Args _args)
{
SysMailerMessageBuilder messageBuilder = new SysMailerMessageBuilder();
SysInfoLogStr emailBodyWithHtml;
EmailBase fromEmail = 'no-reply-vendorportal@testgroup.com';
EmailBase toEmail = 'vijay.yelmame14@gmail.com';
EmailBase ccEmail;
PurchTable PurchTable;
boolean emailSend;
try
{
emailBodyWithHtml = "| Payment | Currency Code | DeliveryPostalAddress | Delivery Date |
| " PurchTable.Payment " | " PurchTable.CurrencyCode " | " any2Str(PurchTable.DeliveryPostalAddress) " | " any2Str(PurchTable.DeliveryDate) " |
Result:
This was originally posted here.

Like
Report
*This post is locked for comments