web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Send Email Through Outlook in AX 2009

(0) ShareShare
ReportReport
Posted on by 75

Hi,

I am new to AX 2009 and looking for a solution that how we can send the email through AX using Outlook 2010,

I am using the following code, but i want to send dierectly to outbox to send email rather opening it in the outlook.

Please help me to figure out this problem.

static void EmailSendingthroughSmmoutlook(Args _args)
{
  CustTable cust;
  str number= "1001 test";
   SmmOutlookEmail      smmOutlookEmail =   new     SmmOutlookEmail();
   str                  email;
   ;
   if (smmOutlookEmail.createMailItem())
   {
        smmOutlookEmail.addEMailRecipient('farrukh@gmail.com');
        
        smmOutlookEmail.addSubject("Test Message from Axapta "+number);
        smmOutlookEmail.isHTML(true);
        smmOutlookEmail.addBodyText('Hi Was just tryin to Send Email through Axapta <B> Test Message from Axapta </B          :)');
        smmOutlookEmail.sendEMail(smmSaveCopyofEmail::No);
        //smmOutlookEmail.sendEMail(smmSaveCopyofEmail::Yes);


    }
}

*This post is locked for comments

I have the same question (0)
  • Muhammad Yasir Profile Picture
    1,023 on at

    Hi,

    I have found a solution to your problem.use the below line of code,

    smmOutlookEmail.sendEMail(smmSaveCopyofEmail::No,false);

    By passing the 'false' as a second parameter the mail automatically sent to the recipient address without opening it in the outlook.

    Hope this would help you in your problem.

    reply here if it resolve your problem.

    Thanks

  • bombtrk Profile Picture
    475 on at

    Use System.Net.Mail

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans