Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invitation subject is not sent correctly with non-standard characters (1.3.1) #137

Closed
valentinab25 opened this issue Feb 26, 2019 · 5 comments
Assignees
Labels
bug Software behaviour is unexpected and/or broken and needs to be corrected
Milestone

Comments

@valentinab25
Copy link

Hello,

We are using our template (medium.email.generators.template.generic.matrixId ) for sending notifications with the following subject:

Subject: %SENDER_NAME_OR_ID% invites you to chat %ROOM_NAME%

In 1.3.1, the subject is not sent correctly when there are any special characters in the name - example "Valentina Bălan invites you to chat test" instead of "Valentina Bălan invites you to chat test". It used to work in the previous versions (for example 1.2.0) . The same characters are sent correctly in the email body.

Is there something I need to set in the template to allow special characters in subjects ? I did not find any reference for subject character set, only for the body ( which works ok).

Thank you

@maxidorius maxidorius self-assigned this Feb 26, 2019
@maxidorius maxidorius added the support User support (repo no-op) label Feb 26, 2019
@maxidorius
Copy link
Member

I had to do some research and this is what I found: there are two RFCs that deal with this:

It seems like 2047 is the one used by email clients. I have sent a test email to myself and this is the Subject header produced:

Subject: =?UTF-8?Q?Valentina_B=c4=83lan_invites_you_to_chat_test?=

which shows as

Valentina Bălan invites you to chat test

I think it was never meant to work and it was just a lucky set of classes available that did in previous releases. This is definitely the valid way of doing it.

@valentinab25
Copy link
Author

valentinab25 commented Feb 26, 2019

Thank you for the quick response. Is it possible for you to use this encoding when you are setting the email subject in code? The problem is that the characters are in %SENDER_NAME_OR_ID%, so there is no way for me to write the subject in the correct format directly in the template.

@maxidorius
Copy link
Member

Oh, you're right, my bad. I'll fix it this week yes!

@maxidorius maxidorius added bug Software behaviour is unexpected and/or broken and needs to be corrected and removed support User support (repo no-op) labels Feb 26, 2019
@maxidorius
Copy link
Member

@valentinab25 After further investigation, the fix is not as easy as I thought it would be, but definitely doable. It will take a few more days. I'll ping you with a docker build when I have something!

@maxidorius maxidorius added this to the v1.4 milestone Apr 27, 2019
@maxidorius
Copy link
Member

@valentinab25 In case you haven't already, can you try with the latest build please ? kamax/mxisd:1.4.2-7-gce7f900

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Software behaviour is unexpected and/or broken and needs to be corrected
Projects
None yet
Development

No branches or pull requests

2 participants