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 :
Small and medium business | Business Central, N...
Suggested Answer

Unable to Send Email from Business Central via Web Service Codeunit Call

(5) ShareShare
ReportReport
Posted on by 10

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!


 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    Hi, Just a possibility. Did you use the current user when setting up the email?
    Please note that when integrating via the API, you do not use the BC user.
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,603 Super User 2025 Season 2 on at

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans