Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

BC On Premise - Email Not Sent error

Posted on by 640

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?

Categories:
  • Nick Webb Profile Picture
    Nick Webb 640 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
    YUN ZHU 64,878 Super User 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
    Inge M. Bruvik 32,722 Super User 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
    Nick Webb 640 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
    Nick Webb 640 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
    Inge M. Bruvik 32,722 Super User 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
    Nick Webb 640 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
    Nick Webb 640 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\.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 289,068 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,987 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans