Thursday, January 13, 2011

How can we send emails from AX using SMTP


Please find attached xpo of info class. It contains modifications, required to send email without outlook. Previously sysINetMail class was used to send report through email. Now I used 'System.Net.Mail' assembly, which do not require any outlook integration.
How to send Report through Email
Setup:
  • Email address defined on 'user options' form, will be used as sender email.
  • Smtp server defined on 'Email parameters' form will be used (company > Administration > Administration area > Setup > Email paramters)
  • Remaining parameters like To, Cc, Subject e.t.c will be picked from the specific report you want to send ( from the report dialog goto Options and select 'email recipients' and provide the information and attachement format)
Process:
  • Open the report you want to send through email.
  • From the report dialog, select Options button.
  • Select the option of 'Email recipients' and provide the necessary detail.
  • Press OK to close the options form.
  • Press OK to close the dialog, now the report will become an attachement in the format you selected and sent.

1 comment:

  1. Thanks for the post...it a good wee xpo..

    ReplyDelete