I needed to be able to have users submit/reply to tickets via email using Outlook on Windows machines. Currently, eTicket doesn't handle emails that have content-transfer-encoding set to base64.
This is an ugly hack and since I am really new to PHP, this might have some logic errors in it.
In pipe.php change:
fclose($incoming);
$parse = new Parser($email);
if ($parse->message['html']) {
$body = strip_tags($parse->message['html']);
} elseif ($parse->message['plain']) {
$body = $parse->message['plain'];
} else {
$body = $parse->plain;
to this:
fclose($incoming);
$parse = new Parser($email);
$replacables = array("\r", "\n", "\r\n", "\n\r");
if ($parse->message['html']) {
$body = strip_tags($parse->message['html']);
$output = str_replace($replacables,"", $body);
if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $output)) {
$body = base64_decode($output);
}
} elseif ($parse->message['plain']) {
$body = ($parse->message['plain']);
$output = str_replace($replacables,"", $body);
if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $output)) {
$body = base64_decode($output);
}
} else {
$body = $parse->plain;
$output = str_replace($replacables,"", $body);
if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $output)) {
$body = base64_decode($output);
}
}