Thursday, July 26, 2012

Sending email through outlook in Dynamics AX

Question:
How can i send an email in AX through outlook?

Answer:

static void OutlookEmail(Args _args)
{
    SmmOutlookEmail smmOutlookEmail = new SmmOutlookEmail();

    ;
    if (smmOutlookEmail.createMailItem())
    {
        smmOutlookEmail.addEMailRecipient('asamad@moorestephens.com.au');
        smmOutlookEmail.addSubject("Test");
        smmOutlookEmail.isHTML(true);
        smmOutlookEmail.addBodyText('Test');
        smmOutlookEmail.sendEMail(smmSaveCopyofEmail::No);
    }
}

1 comment:

  1. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing
    romance

    ReplyDelete