Skip to main content

Sending mail from X++

In order to send the mail from AX, firstly email configuration should be set up.

System administration > Setup > System >E-mail parameters

Once this template filled up, writing query in job or based upon requirement the below code will send the mail :

static void SendQuickMail(Args _args)

str FromAddress = “”;
str Subject = “MailFromX++″;
str Body = “Hi”;
str FileToAttach = “D:\\AXFile.pdf”;
SysMailer mailer = new SysMailer();

Note: Given Path is in AX2012


Post a Comment