Defect #38342
openURLs in outgoing emails get mutilated
0%
Description
Environment:
Redmine version 5.0.2.stable
Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux-gnu]
Rails version 6.1.6
Redmine Silencer 2 version 0.4.3
---
Hello everyone.
When sending Mails, Redmine seems to alter and mutilate URLs in the text body of the mail.
Example:
https://mydomain/index.html?gotoid=121519&setformview=verify
Expected:
https://mydomain/index.html?gotoid=121519&setformview=verify
Result:
https://mydomain/index.html?gotoid1519&setformview=rify
Some URLs are getting part of their starting characters removed in our footer which is static and comes from the Redmine Mail-Template for the header and footer.
If it starts with https:// it becomes ttps://, or if it's a mailto: it becomes ailto:mailto:... .
Same for using the tags for preformatted text <\pre><\/pre> and for code <\pre><\code class="html"><\/code><\/pre>, where then partially things between these tags get simply omitted in the send mail for the recipient, just like with the URLs above. These tags currently seem not to protect the contend inside them.
Sending the mail as plain text (textile) or HTML does not change this behaviour.
We currently can't communicate important code issues or URLs with customers via the issues, but instead have to resort to write an extra mail so everything that needs to be communicated actually does reach the recipient.
What could be something i might look into with Redmine, that might be causing this?
Thank you.
Updated by F H almost 2 years ago
After further investigation we found, that Remdine seems to send Mails with
Content-Transfer-Encoding: quoted-printable
in the header, which seems to result in the above mentioned problems.
I read here
https://www.redmine.org/issues/27691
that it might be related to mail gem and downgrading might help?
Maybe we should upgrade our Redmine to the newest version, would this include updated mail gems and fix this?
Updated by Pavel Rosický over 1 year ago
could you write a test that exposes the problem? https://github.com/redmine/redmine/blob/a499d688021a5ba9f7cb8dba18bb3dc6b0199073/test/unit/mailer_test.rb#L1138 or at least share the broken eml file?
if it's really a problem with quoted-printable, it's probably something that should be fixed in the mail gem. You could also try 2.8.1 https://redmine.org/issues/37993 to see if there's any difference.