Announcements
No record found.
When sending emails to ~2000 unique recipients from code in Dynamics 365 Business Central (D365BC), it's crucial to follow best practices around performance, rate limits, email queuing, and Microsoft policies. Here's a breakdown of your options, risks, and best practices.
Microsoft 365 (Exchange Online) has send limits:
10,000 recipients per day per mailbox.
30 messages per minute.
500 recipients per message (if using BCC-style).
SMTP providers (e.g., SendGrid, Mailgun) have similar or configurable limits.
Best practice: Don’t send all 2000 at once — break into batches, and optionally queue.
Email feature (SMTP, Microsoft 365, or third-party) is built into Business Central.
Use the EmailMessage and Email codeunits.
EmailMessage
Email
Email.Send() is synchronous and not ideal for large volumes.
Email.Send()
Email.SendUsingJobQueue() queues emails for background processing — recommended
Email.SendUsingJobQueue()
To avoid timeouts and performance issues:
Use the Job Queue to queue emails asynchronously.
Send emails in controlled batches via codeunit and schedule through Job Queue.
procedure SendBulkEmails(RecipientList: List of [Text]) var EmailMessage: EmailMessage; Email: Codeunit Email; begin foreach EmailAddress in RecipientList do begin EmailMessage.Create('sender@yourcompany.com', EmailAddress, 'Subject', 'Body'); Email.SendUsingJobQueue(EmailMessage); // This queues the email end; end;
You could also group recipients into BCC batches (e.g., 50–100 per message) to reduce the total volume
For better performance and deliverability:
Use Azure Logic Apps, Power Automate, or external SMTP services (like SendGrid or Amazon SES).
From AL code, call an external API that pushes email data to the service.
This allows:
Rate control
Retry handling
Logging
Deliverability tracking
Log email status and errors (create a custom log table if needed).
Monitor Job Queue entries for failures.
Consider adding retry logic in case of send failure.
Microsoft 365 send limits are not configurable — they're service-enforced.
For higher needs:
Use a dedicated mailbox just for bulk mail.
Use third-party email providers like SendGrid or Mailgun for transactional email via APIs.
Unsubscribe support if it’s a marketing-like email.
Avoid spam-like patterns to protect domain reputation.
Ensure email templates are efficient (no unnecessary dynamic images or large files).
SendUsingJobQueue()
Hi Samantha
When sending emails to around 2,000 unique addresses from code in Business Central, there are several performance and reliability considerations to keep in mind. Here's a breakdown of best practices:
1. Use the Email Outbox and Queuing Logic
Email Message
2. Respect Rate Limits
3. Batch and Delay Logic
4. Use AL Code Safely Here’s a simplified example of how to queue emails:
EmailMessage.CreateMessage(ToAddress, Subject, Body, false); EmailMessage.AddRecipient(ToAddress); EmailMessage.Send(false); // false = send via outbox
5. Monitor and Retry
Supporting Visual Here’s a screenshot showing how to configure the email rate limit in Business Central: https://yzhums.com/32813/
Let me know if you’d like help writing the batching logic or setting up the job queue. We can make this scalable and safe for production use.
If you find this helpful, feel free to mark this as the suggested or verified answer. Cheers Jeffrey
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 2,005 Super User 2026 Season 1
YUN ZHU 1,148 Super User 2026 Season 1
Khushbu Rajvi. 557 Super User 2026 Season 1