Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

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

Posted on by 307
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 
 
  • Suggested answer
    Hana Xue Profile Picture
    Hana Xue 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
    Ramit Paul 22,300 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans