401
Views
9
Comments
Solved
Unable to send mail because of unsuccessful authentication

Until the 1st of October I was able to send mails from my OutSystems traditional mail application without any problems. Starting from the 1st of October I was not able to send any mails anymore. I am seeing error in Service Center:

 “Error sending email 3228: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [xxxxxxxx.xxxxxxxx.prod.outlook.com]”

We did the following:

  • Created an App password in AzureAD
  • Refreshed the current password and tested

That did not work. Further we:

  • Registered the mail app in AzureAD with the to be used mailbox/account
  • Generated a secret
  • Added API permissions for Microsoft Graph and added the settings to send mail:

Then we:

  • Installed a Forge component “Microsoft Login Connector Management”
  • Configured this application with our settings from Azure:

Note: we only would like to send mails. We are not interested in reading mails or calendars etc.

Unfortunately this did not solve our problem. We are still seeing the same error. I am wondering if there is somebody who solved this issue?

2022-07-02 17-29-12
Rogier Mullaart
Solution

This issue is solved because we added the United States to the trusted regions in Azure. 

So the problem lies in the location (country) of the OutSystems server and the location of the mail server (exchange online of Microsoft). If there is no trust then there will be a problem with the authentication.

UserImage.jpg
Krishanu Deb Roy

I'm facing the same issue.

Could you guide me how to add to the trusted regions in Azure please?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

As you are using Outlook, I think this is because of the change described here. Note this is not directly OutSystems-related, it's Outlook that has changed its authentication.

2022-07-02 17-29-12
Rogier Mullaart

Hi Kilian,

Thank you for your reply. I have seen that notification also. And because of that notification I tried to apply a better way of authentication and no basic authentication. That's what I tried to describe (using a app password etc.). But that does not seem to be the solution. 


Do you maybe know what we can do? What can we do to anticipate on the changes in exchange online?

Regards. 

 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Well, if I'm reading this communiqué right, you can re-enable basic authentication for the remainder of the year.  That would be my first step - current software should be able to run again.

It's difficult to advise you how to solve it for the long run, as I don't know the details of the way you are currently sending mail. The document I linked to in my previous post has a lengthy discussion about what to do in which cases, but I don't know, for example, whether you are using SMTP AUTH or Outlook directly for sending.

2022-07-02 17-29-12
Rogier Mullaart

Ok thnx Kilian,

It is good to hear that for the mean while we could reinstall basic authentication. 

We use the standard way OutSystems is configured to send mail in Service Center:

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

This article leads me to believe it is perhaps possible to re-enable SMTP with basic authentication. It says it's adviced against, but still possible. So perhaps talk to your Office365 admin to see if they did something to prohibit basic authentication for Office365 SMTP AUTH.

2020-09-21 08-42-47
Vincent Koning

We also used mailing directly to Office 365 in the past but stopped doing that because of several issues. One of the mail issues we had was that we were not able to use different senders easily due to restricting in Office 365 (which are logical from a security perspective). We are now using Sendgrid as a "hub" and this works good enough. We can use all addresses in the domain assigned without any issues and authentication is still basic. 

I still find it a shame that OutSystems is not able to send mail directly to the targeted domains SMTP server but alas, it is what it is. 

2022-07-02 17-29-12
Rogier Mullaart

Thank you Vincent,

I will look into the sendgrid sollution. But adding a solution in between is an extra vulnerability and would prefer that OutSystems provides a proper solution. Do you know if OutSystems are working on this?

2022-07-02 17-29-12
Rogier Mullaart
Solution

This issue is solved because we added the United States to the trusted regions in Azure. 

So the problem lies in the location (country) of the OutSystems server and the location of the mail server (exchange online of Microsoft). If there is no trust then there will be a problem with the authentication.

UserImage.jpg
Krishanu Deb Roy

I'm facing the same issue.

Could you guide me how to add to the trusted regions in Azure please?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.