Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Wrong formatted report messages when releasing mails #910

Closed
Skywalker-11 opened this issue Aug 4, 2017 · 3 comments
Closed

Wrong formatted report messages when releasing mails #910

Skywalker-11 opened this issue Aug 4, 2017 · 3 comments
Labels
Milestone

Comments

@Skywalker-11
Copy link
Member

If you have umlauts in the report messages defined by conf.php variables the conf file needs to be ansi encoded or will be displayed with wrong formatting in mail clients . Eg.

define('QUARANTINE_REPORT_FROM_NAME', 'MailWatch für MailScanner');
define('QUARANTINE_REPORT_SUBJECT', 'E-Mail Quarantäne-Bericht');
define('QUARANTINE_SUBJECT', 'Nachricht aus Quarantäne freigegeben');
define('QUARANTINE_MSG_BODY', 'Dies ist eine automatisierte Mail.
Die ursprüngliche E-Mail befindet sich im Anhang dieser Mail.

Mit freundlichen Grüßen,
Eure IT');

will result in the following mail body if the conf file encoding is utf-8

Dies ist eine automatisierte Mail.
Die ursprüngliche E-Mail befindet sich im Anhang dieser Mail.

Mit freundlichen GrüÃYen,
Eure IT

Thats because the mail encoding defined by the mail headers are "ISO-8859-1" in mailscanner/lib/pear/Mail/mime.php

@endelwar endelwar added this to the v1.2.6 milestone Aug 22, 2017
@endelwar endelwar added the bug label Aug 22, 2017
@endelwar
Copy link
Member

@Skywalker-11 could you please try the branch https://github.com/mailwatch/MailWatch/tree/feature/fix-mail-headers that should fix this header problem?

@Skywalker-11
Copy link
Member Author

Yes working now with utf-8 encoding.
Problem could be that ANSI/ISO-8859-1 encoding is not working anymore so that people who adjusted the conf file in the past to be ANSI encoded will get the character garbage when they will update MailWatch

@endelwar
Copy link
Member

Right. I'm going to implement https://github.com/neitanod/forceutf8 for this case to convert safely to utf8, once this library is in place it can be used in other sections of the actual code that deal with unknown encoding (e.g.: email subject or headers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants