send email from within Axapta

hello, An email question : can I create a rapport and then email it (as an attachement) to one person with a known email adres? I know I can do this manually (by choosing the printout to be the email recipient), but I need a job that does that automatically. something like Args aa = new Args(); ReportRun rn = new ReportRun(aa); result = rn.run(); // and now some code to send this report as an attachement. Suggestions ? thx in advance, Kathleen

Hi Kathleen, Please refer to reportSendMail in Info class. Here it uses SysINetMail class for sending report by email. Hope this helps, Harish Mohanbabu

hi , this kind of leads me to my next question : how do I capture my report and save it to a local temp directory on the users pc before I send it? I suspect I have to manipulate the PrintJobSettings? But I don’t seem to find the solution? I have a job static void myJob(Args _args) { Args aa = new Args(“myReport”); ReportRun rn = new ReportRun(aa); SysINetMail m = new SysINetMail(); PrintJobSettings p1 = new PrintJobSettings(); str fileName; ; rn.run(); // code to catch my report and save it in to the p1.fileName() ??? fileName = subStr(p1.fileName(),strLen(p1.fileName())-3,-999)+‘PDF’; m.sendMailAttach(p1.mailTo(),p1.mailCc(), p1.mailSubject(),‘Axapta report’, FALSE, p1.fileName(), fileName); } thx for the help, Kathleen

Since the original poster has figured out the final solution, I am closing this topic. The solution is available at - http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=13692 Harish Mohanbabu