1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00
phorge-phorge/scripts
David Reuss dc0d3f3fef Fix encodings for mime headers and body if not UTF-8
Summary:
If mails are not sent in UTF-8 we cannot just it verbatim, so we have to
encode it into UTF-8 if it is not the case. Mime headers use different
encodings like "quoted-printable", which we have to handle.

It looks like "Subject: =?iso-8859-1?Q?opr=E6t_s=E5_den_task?=", and can
be decoded by ##iconv_mime_decode##.

Furthermore the body of the email might be in various encodings as well,
which we attempt to pull from the content-type header of the plain text
part of the mail.

Test Plan:
Attempted receiving mails in a variety of flavors. These could be
converted to test-cases once i know if this is a sane solution. Got
expected results from mails sent with Windows-1252 and ISO-8859-1.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley, davidreuss

Differential Revision: 1093
2011-12-02 08:47:45 -08:00
..
crossref Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
daemon Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
install Add test to check all symbols can be loaded 2011-10-20 16:43:13 -07:00
mail Fix encodings for mime headers and body if not UTF-8 2011-12-02 08:47:45 -08:00
repository Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
search Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
setup Test for pcntl availability from the command line, not Apache 2011-05-30 21:02:08 -07:00
sql Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
user Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
__init_env__.php Fix __init_script__.php issue with event engine. 2011-09-30 13:17:45 -07:00
__init_script__.php Merge __init_env__.php into __init_script__.php 2011-10-02 11:48:09 -07:00
celerity_mapper.php Add cycle detection to celerity mapper 2011-11-29 12:09:08 -08:00