web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Where does Sender Email Address come from in Business Central V14 On-Prem?

(0) ShareShare
ReportReport
Posted on by 911

Where does the Sender Email Address come from in Business Central V14 On-Prem (Version: Platform 14.0.29530.0 + Application 29537 (GB Dynamics NAV 14.0))?

I think it looks in the User's contact email address, but does it also look somewhere else? We're finding it varies.

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    How did you configure the SMTP Server in BC140? Otherwise, take a look here:

       LOCAL PROCEDURE QualifyFromAddress@2();

       VAR

         TempPossibleEmailNameValueBuffer@1000 : TEMPORARY Record 823;

         MailForEmails@1001 : Codeunit 397;

       BEGIN

         OnBeforeQualifyFromAddress(TempEmailItem);

         IF TempEmailItem."From Address" <> '' THEN

           EXIT;

         MailForEmails.CollectCurrentUserEmailAddresses(TempPossibleEmailNameValueBuffer);

         IF GraphSupported THEN

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'GraphSetup') THEN

             EXIT;

         IF SMTPSupported THEN BEGIN

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'SMTPSetup') THEN

             EXIT;

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'UserSetup') THEN

             EXIT;

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'ContactEmail') THEN

             EXIT;

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'AuthEmail') THEN

             EXIT;

           IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'AD') THEN

             EXIT;

         END;

         IF TempPossibleEmailNameValueBuffer.ISEMPTY THEN BEGIN

           IF FileManagement.IsWebClient THEN

             ERROR(FromAddressWasNotFoundErr);

           TempEmailItem."From Address" := '';

           EXIT;

         END;

         IF AssignFromAddressIfExist(TempPossibleEmailNameValueBuffer,'') THEN

           EXIT;

       END;

    Hope it helps.

  • Nick Webb Profile Picture
    911 on at

    Thanks for pointing me in the right direction. Here are my findings :-

    It trawls around building a list of possible email addresses.

    If the User ID field in the 'SMTP Mail Setup' page is an email address, it adds it to the list

    If Graph is enabled it adds value "Graph Mail Setup"."Sender Email" to the list

    If current user has an entry in "User Setup" add value from field "E-Mail" to the list

    If the "Contact Email" field has a value in the current user's User Card it's added to the list.

    If the "Authentication Email" field has a value in the current user's User Card it's added to the list.

    If the environment is not SaaS, it calls a procedure called TryGetEmailAddressFromActiveDirectory. I can't see the code for this. It's hidden DotNet code, but the name is self-explanatory.

    Having compiled the list, it then uses the following priority order

    1. Graph
    2. SMTP Mail Setup
    3. User Setup
    4. Contact Email
    5. Authentication Email
    6. Active Directory

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,466 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,829 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,505

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans