Redmine mails "broken" since oAuth2 MS Office 365 integration

461 views Asked by At

we are using Redmine version 4.x and 5.x (both tested with this issue). We also use Redmine Helpdesk Pro as a plugin.

Since the change to oAuth2 for MS 365 integration we have the problem, that mails getting wired regarding the content.

For example (german text, but it shows the problem in generic)

Das Ganze=urde auf die URL api.example.com vorgenommen. Würden wir =inen Fehler gegenüber der API haben, würden wir einen Status C=de 401 (unauthorized) oder 404 (not found)

There are always chars that get replaced by =. The position of the = is in a range from col 64 to (last recent found) 75.

Even if i am calling Redmine to send in plaintext only, the email sent from Redmine has the = issue.

If i am checking the mail itself it seems to be sent in / as html mail. But the header seems to be correct (clicked into the message and selected Quelle anzeigen / show source) and the content is:

> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   
> "http://www.w3.org/TR/html4/loose.dtd"><html lang="en"><head> <meta
> http-equiv="Content-Type" content="text/html; charset=utf-8">
>       <style type="text/css" media="screen">
>         =      </style>   </head>

But sometimes it is a <br> and then a <br=> or even <br ?Die="" Abfragen="" The last example includes even more text.

I already consulted the documentation of RedmineUp, also we got a "fix" for it, but it doesn't give any results.

So maybe someone of you had this issue too and got a solution? Probably i have to change something in Azure Settings?

2

There are 2 answers

0
alter.daemon On

We had exactly the same case and problem with emails garbling. We also use Redmine 4.2x and Helpdesk Pro plugin.

Our solution is to use OAuth Outlook for inbound helpdesk emails and smtp with basic auth for outbound helpdesk emails. So we don't use default settings for OAuth Outlook outgoing mail server, we made separate configuration for it like so:

  • protocol: smtp
  • server: smtp.office365.com
  • port: 587
  • auth method:login
  • pass:
  • SSL and TLS

It works just fine and my understanding is that we don't need OAuth for SMTP for now, only for IMAP.

Hope it helps.


0
Michael On

We had tested hours and hours and the "problem" is wired!

If your paragraph is longer then ~700 Chars and there is no double new line, the mail gets brocken. If you have a bigger paragrahp with > ~700 chars and make two newlines, so that paragraphs are more "seperated" it worked. Tested it with bigger lorem ipsum texts. Also it seems RedmineUp had fixed some things too, but i don't know what, as we do not host it ourselves.

The answer from @alter-daemon worked too for a period of time, maybe MS changed some additional things on our AD for sending with SMTP.

So this should be the two options for a successfull integration