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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

the remote server returned an error: (401) unauthorized - When sending emails from Dynamics 365 F&O

(1) ShareShare
ReportReport
Posted on by 72
Hi All, 
 
I am hoping someone can help me. 
 
I am getting the error below when i am trying to send and email from Dynamics:
 
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.Dynamics.Platform.Integration.Exchange.HttpExecutor.Send(IHttpExecutorRequest request)
   at Microsoft.Dynamics.Platform.Integration.Exchange.ExchangeProxy.<>c__DisplayClass20_0.<SendMessage>b__0()
   at Microsoft.Dynamics.Platform.Integration.Exchange.ExchangeProxy.SendMessage(MailMessage sourceMessage, Guid correlationId)
   at Dynamics.AX.Application.SysMailerExchange.`sendMessage(MailMessage _message, Boolean _interactive, Guid _correlationId)
 
Can you advise why this is?
 
 
Any help you can provide will be much appreciated. 
 
Kind regards,
 
Hetal 
 
I have the same question (0)
  • Suggested answer
    Hana Xue Profile Picture
    7,131 Microsoft Employee on at
    the remote server returned an error: (401) unauthorized - When sending emails from Dynamics 365 F&O
    Hi,
    The error message "The remote server returned an error: (401) Unauthorized" usually means that the system is encountering a problem with the verification or authorization email sending process.
    • Verify that email settings are configured correctly. Make sure email parameters, SMTP server, username, password and any other relevant settings are accurate.
    • The error message specifically mentions "401 Unauthorized," which is usually related to authentication issues. Double check the email account credentials used to send the email.
    • The error message mentions "An error occurred during format mapping run". Review the email format mapping settings to make sure they are configured correctly. Check for any issues with format conversion or files. You can test sending an email with different attachments to see if the problem is specific to this file.
    • Verify the email address to which you want to send the email. Test the email sending process with simplified messages and attachments to isolate issues.
    If there is no problem with the above, as Ramit said, you can try to contact the developer for debugging, or check the relevant logs.
    Hope these suggestions are useful.
    Best Regards,
    Hana
  • Suggested answer
    Ramit Paul Profile Picture
    22,757 Most Valuable Professional on at
    the remote server returned an error: (401) unauthorized - When sending emails from Dynamics 365 F&O
    There can be multiple things to look at.
     
    I would check my email parameter by "Test connection" if fine that means system can send email.
     
    I would then check other standard report if those can be sent from system by using email as destination.
     
    if above two are fine, there must be issue with the payment advice destination setup and vendor email details.
     
    If everything is fine, I would re-import the payment format from ER repos from ER workspace and try.
     
    if everything is fine, I would debug by a developer to see what is the issue.
     

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

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 49 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 33 Most Valuable Professional

#3
Vinayak Hegde Profile Picture

Vinayak Hegde 17

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans