Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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