how to email PO in AX 2012

when a user create a PO, how could I set up AX so that it can email a copy to the user who created it in AX 2012

Hi patrick Am…

this is the code to send the mail through x++…

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();





write the above code in purchtable insert() method… using the created by field…

So u can set an automatic mail… to the user who creates the PO…