static void AD_SendEmailOutlook(Args _args)
{
SysEmailId emailId;
DialogField dlgEmailId;
CustTable custTable;
LanguageId languageId = 'EN-IN';
#define.CurrentVersion(1)
#localmacro.CurrentList
emailId
#endmacro
SendEmail sendEmail;
SysInetMail mail;
str subject()
{
return SysEmailMessageTable::find(emailId, languageId).Subject;
}
str processMappings(str _message)
{
Map mappings;
;
mappings = new Map(Types::String, Types::String);
mappings.insert('CustomerName', "Anu");
mappings.insert('CustomerStreet', "Testingg");
return SysEmailMessage::stringExpand(_message, mappings);
}
str message()
{
COM document;
COM body;
str ret;
SysEmailMessageTable message;
#help
;
message = SysEmailMessageTable::find(emailId, languageId);
ret = processMappings(message.Mail);
//ret = WebLet::weblets2Html4Help(ret, '');
document = new COM(#HTMLDocumentClassName);
SysEmailTable::insertHTML2Document(document, ret);
body = document.body();
if (!body)
{
return '';
}
return body.outerText();
}
;
//sendEmail = new SendEmail();
emailId = "Test";
mail = new SysInetMail();
mail.parmForceSendDialog(true);
mail.sendMail("support@****.com",subject(), message(),false);
info("sent");
}
{
SysEmailId emailId;
DialogField dlgEmailId;
CustTable custTable;
LanguageId languageId = 'EN-IN';
#define.CurrentVersion(1)
#localmacro.CurrentList
emailId
#endmacro
SendEmail sendEmail;
SysInetMail mail;
str subject()
{
return SysEmailMessageTable::find(emailId, languageId).Subject;
}
str processMappings(str _message)
{
Map mappings;
;
mappings = new Map(Types::String, Types::String);
mappings.insert('CustomerName', "Anu");
mappings.insert('CustomerStreet', "Testingg");
return SysEmailMessage::stringExpand(_message, mappings);
}
str message()
{
COM document;
COM body;
str ret;
SysEmailMessageTable message;
#help
;
message = SysEmailMessageTable::find(emailId, languageId);
ret = processMappings(message.Mail);
//ret = WebLet::weblets2Html4Help(ret, '');
document = new COM(#HTMLDocumentClassName);
SysEmailTable::insertHTML2Document(document, ret);
body = document.body();
if (!body)
{
return '';
}
return body.outerText();
}
;
//sendEmail = new SendEmail();
emailId = "Test";
mail = new SysInetMail();
mail.parmForceSendDialog(true);
mail.sendMail("support@****.com",subject(), message(),false);
info("sent");
}
No comments:
Post a Comment