Notifications
Announcements
No record found.
Hello everyone,
I'm currently working on a Business Central (BC) integration where an API-exposed codeunit should trigger an email to be sent. My SMTP email settings are configured correctly—I'm able to send and receive test emails through the Email Accounts setup in BC without any issues.
However, when invoking the same codeunit through a Web Service call (OData), the email fails to send. Here's a screenshot of the error:
Interestingly, when I go to Email Outbox, the failed emails appear there. If I manually click "Send Email" from the outbox, they are sent successfully without any modifications. Here's a screen shot of the error on the Email Outbox.
Has anyone encountered this before? Is there a specific permission, context, or setting that prevents emails from being sent during a web service/API-triggered codeunit execution?
Any help or pointers would be greatly appreciated. Also, here's a screen shot of the specific codeunit being called (I've removed some identifiable information for Privacy):
Thanks in advance!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 2,238
YUN ZHU 773 Super User 2025 Season 2
Sumit Singh 630