jbostoen/itop-jb-mail-to-ticket-automation-v2

MIME Encoded subjects: sometimes an unwanted space or tab? (multiline)

Closed this issue · 1 comments

Examples of email headers:

Adding unwanted spaces.

FW: ⚠ This is a test with an emoji in the subject and a long subject message which will cause multi line subjects and encoding

Subject:
 =?utf-8?B?Rlc6IOKaoCBUaGlzIGlzIGEgdGVzdCB3aXRoIGFuIGVtb2ppIGluIHRoZSBz?=
 =?utf-8?B?dWJqZWN0IGFuZCBhIGxvbmcgc3ViamVjdCBtZXNzYWdlIHdoaWNoIHdpbGwg?=
 =?utf-8?Q?cause_multi_line_subjects_and_encoding?=

FW: ⚠ Aanpassing: 'verwijderde items' in Outlook zal na 90 dagen automatisch gewist worden

Subject:
 =?utf-8?B?Rlc6IOKaoCBBYW5wYXNzaW5nOiAndmVyd2lqZGVyZGUgaXRlbXMnIGluIE91?=
 =?utf-8?Q?tlook_zal_na_90_dagen_automatisch_gewist_worden?=

Current debugging:

input: 	=?utf-8?B?Rlc6IOKaoCBUaGlzIGlzIGEgdGVzdCB3aXRoIGFuIGVtb2ppIGluIHRoZSBz?= =?utf-8?B?dWJqZWN0IGFuZCBhIGxvbmcgc3ViamVjdCBtZXNzYWdlIHdoaWNoIHdpbGwg?= =?utf-8?Q?cause_multi_line_subjects_and_encoding?=
output: 	FW: ⚠ This is a test with an emoji in the subject and a long subject message which will cause multi line subjects and encoding
input: =?utf-8?B?4pqgIFRoaXMgaXMgYSB0ZXN0IHdpdGggYW4gZW1vamkgaW4gdGhlIHN1Ympl?==?utf-8?B?Y3QgYW5kIGEgbG9uZyBzdWJqZWN0IG1lc3NhZ2Ugd2hpY2ggd2lsbCBjYXVz?==?utf-8?Q?e_multi_line_subjects_and_encoding?=
output: ⚠ This is a test with an emoji in the subject and a long subject message which will cause multi line subjects and encoding