In MailhandlerPhpImapRetrieve::get_part there is $charset defaulting to 'auto' and if $structure doesn't come with any charset information then later we will be calling drupal_convert_to_utf8() which result in a call to @iconv($encoding, 'utf-8', $data) with $encoding being set to 'auto'. This seems to be returning FALSE in all cases that I tested. Even this simple snippet returns FALSE:

$data = 'abc';
$encoding = 'auto';
$out = @iconv($encoding, 'utf-8', $data);

Not sure yet how to resolve this, but with pure plain text emails, there doesn't come any charset information and those then fail with empty body text.

Any idea?

Comments

jurgenhaas created an issue.