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

BC On Premise - Email Not Sent error

(0) ShareShare
ReportReport
Posted on by 713

I've managed to set-up a 'Current User' Email Account and accompanying AAD App Registration. When I click the [Verify Registration] button on the Email Application AAD Registration page in BC it reports 'Success! Your authentication was verified.'

However, when I try and send an email via the 'Email Editor (13, Document) page, it reports:-

The email was not sent because of the following error: "The mailbox is either inactive, soft-deleted, or is hosted on-premise." Depending on the error, you might need to contact your administrator.

This error is also encountered when attempting to send a test email from the Email Accounts page.

How do I get this working?

  • Nick Webb Profile Picture
    713 on at
    RE: BC On Premise - Email Not Sent error

    Thanks Inge and Zhu for your suggestions. I value your opinions. Honestly, in the past, I've got more solutions from this forum than I have from a Microsoft Technical Support ticket. Anyway, I 've come up with a clunky solution. As I only work for a small company, I've created an Smtp Email Account for each employee with their email address stored inside, and I've customised my code to conditionally choose the appropriate Email Account. So, in short, I've bypassed Current User and 365 email account types.

  • Suggested answer
    YUN ZHU Profile Picture
    78,989 Super User 2025 Season 1 on at
    RE: BC On Premise - Email Not Sent error

    Hi, I agree with Igne, if you have tried all the methods provided in the MS Docs below and the problem has not been solved, it is recommended to submit an SR to Microsoft. This may be a problem with the server, network, firewall, mail server settings, etc.

    https://docs.microsoft.com/en-us/dynamics365/business-central/admin-how-setup-email#setting-up-email-for-business-central-on-premises

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    999 Moderator on at
    RE: BC On Premise - Email Not Sent error

    Since this involves more solutions than just Business Central and you are not able to get it to work by following the documentation i would recommend you reach out to your partner and seek their help. They can if needed open a support case with Microsoft and that can involve both BC, Azure AD and Exchange resources.

    With your business need for e-mail handling it would maybe be a good idea also to consider going to BC online unless you have very specific needs that requires you to run BC on prem.

  • Nick Webb Profile Picture
    713 on at
    RE: BC On Premise - Email Not Sent error

    ... remembering that we've lost the ability to change the From Address in code as this threads bears out:-

    community.dynamics.com/.../how-to-change-from-address-when-sending-email-in-an-al-extension

  • Nick Webb Profile Picture
    713 on at
    RE: BC On Premise - Email Not Sent error

    Hi Inge,

    I'm already using the SMTP connector. That's working and is good for some parts of the system, but it sends from a fixed email address. We have a particular requirement in a different part of the system to send from the current user's email address. Hence the need for the Current User Email Account.

    Thanks

    Nick

  • Suggested answer
    Inge M. Bruvik Profile Picture
    999 Moderator on at
    RE: BC On Premise - Email Not Sent error

    In your case i think you need to use the SMTP connector.

    Please look at this doc:

    docs.microsoft.com/.../admin-how-setup-email

  • Nick Webb Profile Picture
    713 on at
    RE: BC On Premise - Email Not Sent error

    The mailbox concerned is hosted on-premise. Does that mean what I’m trying is a flawed concept?

    Am I missing a step?

  • Nick Webb Profile Picture
    713 on at
    RE: BC On Premise - Email Not Sent error

    I found this error detail in the Event Viewer:-

    Message Could not send the email {09D6CC61-F0B0-4FC3-B664-BFE364BE81F9} because of the following error: Use ERROR with a text constant to improve telemetry details.

    Call stack:

    "Email - Outlook API Client"(CodeUnit 4508).ProcessErrorMessageResponse

    line 4 - Email - Outlook REST API by Microsoft\"Email - Outlook API Client"(CodeUnit 4508).SendMailSingleRequest - Email - Outlook REST API by Microsoft\"Email - Outlook API Client"(CodeUnit 4508).SendEmail - Email - Outlook REST API by Microsoft\"Email - Outlook API Helper"(CodeUnit 4509).Send

    line 11 - Email - Outlook REST API by Microsoft\"Current User Connector"(CodeUnit 4500).Send

    line 4 - Email - Current User Connector by Microsoft\"Send Email"(CodeUnit 8890).OnRun(Trigger)

    line 8 - System Application by Microsoft\"Email Dispatcher"(CodeUnit 8888).OnRun(Trigger)

    line 30 - System Application by Microsoft\"Email Impl"(CodeUnit 8900).Send

    line 40 - System Application by Microsoft\"Email Impl"(CodeUnit 8900).Send

    line 4 - System Application by Microsoft\Email(CodeUnit 8901).Send

    line 2 - System Application by Microsoft\"Email Test Mail"(CodeUnit 8887).OnRun(Trigger)

    line 35 - System Application by Microsoft\.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,025 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,852 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans