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)

sending multiple files via sendMail

(0) ShareShare
ReportReport
Posted on by

Hello

I am trying to send multiple attachments via the  SysEmailTable::sendMail().

The Method just has one parameter for one single file attachment. Is there any way to attach a second file to the email? 

Thank you guys and have a good weekend :)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Malcolm Burtt Profile Picture
    1,475 on at

    Not without modifying the code but that would be simple enough. You could add an extra argument to the method that takes an optional list of filenames and then process those filenames in exactly the same way as the standard attachment filename argument is process, incrementing the DataId value that's assigned to the outgoingEmailData table for each row that this creates.

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    I would agree with @Malcolm

    if you see at the following standard code in AX

    SysEmailBatch(class) >> sendToBatch (method)

    //around line number24, 25, 26, 27

    if (attachmentFileNameList)

       {

           enumerator = attachmentFileNameList.getEnumerator();

           while (enumerator.moveNext())

    it is taking values from list. so you can pass multiple values, by loop and those multiple values(FileName+Path) will be set to attachmentFileNameList.

    that's all, and remaining it would manage itself

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