Follow-up to #2824962: Update Mailhandler with Inmail Mime changes

Problem/Motivation

Inmail provides getFrom() helper method in form of an array while Mailhandler relies on string value.

Proposed resolution

Get string value from getFrom() and fix a leftover (MultipartEntity -> MimeMultipartEntity) from #2824962: Update Mailhandler with Inmail Mime changes

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Updated getFrom() usages and fixed the leftover. Let's check the test bot.

mbovan’s picture

The last submitted patch, 2: remove_field_value-2820667-8.patch, failed testing.

The last submitted patch, 2: remove_field_value-2820667-8.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 3: fix_getfrom_usage_in-2826094-3.patch, failed testing.

The last submitted patch, 3: fix_getfrom_usage_in-2826094-3.patch, failed testing.

mbovan’s picture

Fix for MailhandlerWebTest.

  • mbovan committed fb56683 on 8.x-1.x
    Issue #2826094 by mbovan: Fix getFrom() usage in Mailhandler
    
mbovan’s picture

Status: Needs review » Fixed

Green! Committed. :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

maxilein’s picture

This patch obviously did not make it to the latest dev version!

The latest dev version contains the erroneous line:

- $from = $message->getFrom()->getAdress();

This patch contains the line: BUT it is NOT in the dev version!
+ $from = $message->getFrom()['address'];

But the only line that really works can be found in my patch over here: https://www.drupal.org/node/2850498#comment-11991993
$from = $message->getFrom()[0]->getAddress();

maxilein’s picture

Category: Task » Bug report
mbovan’s picture

Hm, yes... There could be multiple email "from" recipients and this change introduced in Inmail seems to broke Mailhandler.

Let's stick with #2850498: Let analyzers use first From address in order to fix this problem.