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 = “chaitanya.k@dhanushinfotech.net”;

str FromAddress = “chaitanya.k@dhanushinfotech.net”;

str Subject = “New2”;

str Body = “Hi”;

str FileToAttach = “D:\fn.pdf”;

SysMailer mailer = new SysMailer();

;

mailer.ccs().appendAddress(“chaitanya.k@dhanushinfotech.net;ramakrishna.k@dhanushinfotech.com”);

mailer.quickSend(fromaddress,"chaitanya.k@dhanushinfotech.net",subject,body,"",FileToAttach);

}

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…