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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to send multiple attachments Using SysMailerMessageBuilder Class

(2) ShareShare
ReportReport
Posted on by 152
Requirement is I want to attach Mutiple PDF files, in a single email, Thanks
 var builder = new SysMailerMessageBuilder();
 builder.addTo(emails);
 builder.setFrom(sysEmailTable.SenderAddr, sysEmailTable.SenderName);
 builder.setSubject(subject);
 builder.setBody(messageBody);
 builder.addAttachment() // this method can be used to attach only single file per email
 var message = builder.getMessage();
 SysMailerFactory::getNonInteractiveMailer().sendNonInteractive(message);
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    238,149 Most Valuable Professional on at
    Calling addAttachment() multiple times to add multiple attachaments is possible. What problem do you have with it? Please show us also your code for adding an attachment (the code snippet above doesn't do that).
  • Raj Borad Profile Picture
    1,444 on at
    Hi,
     
    Have you tried addAttachment() method in loop? 
    And other alternative option is to combine files in single pdf or zip file.

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

News and Announcements

Season of Giving Solutions is Here!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 732 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 413 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 289 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans