Remarks:
We have sent mail using x++ code using SysMailerMessageBuilder system classes
Code:
We have sent mail using x++ code using SysMailerMessageBuilder system classes
Code:
class EmailSendingCodes
{
/// <summary>
/// Runs the class with
the specified arguments.
/// </summary>
/// <param name =
"_args">The specified arguments.</param>
public static void main(Args _args)
{
SysMailerMessageBuilder messageBuilder = new SysMailerMessageBuilder();
Email toEmail;
Email fromEmail;
try
{
toEmail = "wingsraam@gmail.com";
FromEmail = "wingsraam@outlook.com";
messageBuilder.setBody("Hello from D365", false);
messageBuilder.setSubject("Email Test from D365");
messageBuilder.addTo(toEmail);
//
Note: not calling setFrom() defaults to the current user for SMTP client,
whereas
//
when sent to Outlook any setFrom() value will be ignored since profiles on the
client is used
messageBuilder.setFrom(fromEmail);
// Open the generated
email in the configured client
//
Sends a message interactively, allowing the user to view and modify the message
before
SysMailerFactory::sendInteractive(messageBuilder.getMessage());
//
Try using sendNonInteractive method too
}
catch (Exception::Error)
{
throw error("@SYS33567");
}
}
}
The Best Casino Bonuses & Promotions in Canada
ReplyDeleteIn bet365 kor addition to 텐벳 먹튀 the many 아이 벳 different online gambling sites available in Canada, we'll also have list of 포커 디펜스 bonuses and promotions max88 available to players at the top