Email sending to customer/vendor using built-in functionality in ax 2012

Hello everyone,

I come up with good stuff which emphasis on how to setup Email configuration, sending the message with an attachment in ax 2012. I will elaborate on Tables, Form navigation, and classes involved in this process.

Important tables involved in configuration message body, message sender, message, etc.

1. SysEmailParameters
// configure the SMTP port no, SMTP relay server name, attachment path, and max attachment allowed.
2. SysEmailTable
//contains the email template such as sender name, sender email address, Default language.
3. SysEmailMessageTable
//Contains subject, message body and layouts such as HTML and XLST.
4. SysOutgoingEmailTable
//contains history of messages sends, senders, receiver, priority, status, etc
5. SysOutgoingEmailData
//contains history os messages with attachment, file name, extension and latest change date.

Form navigation for Email Template is as follows:

Organisation Admin -> Setup -> Email Templates (used to configure email template)

1

E-mail message Form is the menu item where you can edit message body.

2.png

Form navigation for Email sending status is as follows:

System administration -> Periodic -> Email processing -> Email sending status

Here, messages setup in queue in the waiting status and has to be cleared by running E-mail distributor- General batch job.

3.png

Form navigation for E-mail distributor-General batch is as follows:

System administration -> Inquires-> Batch jobs -> Batch jobs. (This has to be in the waiting status otherwise messages will not be sent)

4

SysEmailTable has sendEmail() static method responsible for sending message takes the parameters as EmailID, default language, recipient email address, attachment, number of retries, current user id, traceable and XML data.

once the message is sent will update SysOutgoingEmailTable SysOutgoingEmailData tables where you can see messages ( body, subject, sender, recipient, attachment).

If you want the code to send the email, below is the link which is a replica of sendEmail() method of SysEmailTable and very helpful.

Send email with attachment

 Hope you liked my post.  

Till then, Happy DaXing..,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: