Sending a mail through X++

Fill the necessary email parameters that are required to send a mail in AX.

Go to Administration(Module) > Set up > Email parameters.


Use below code to send a mail through X++ with attachment:
static void c_SendQuickMail(Args _args)
//str ToAddress = “”;
str FromAddress = “”;
str Subject = “New2”;
str Body = “Hi”;
str FileToAttach = “D:\\fn.pdf”;
SysMailer mailer = new SysMailer();


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s