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.
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
Comment | File | Size | Author |
---|---|---|---|
#8 | fix_getfrom_usage_in-2826094-8-interdiff.txt | 1000 bytes | mbovan |
#8 | fix_getfrom_usage_in-2826094-8.patch | 2.9 KB | mbovan |
#3 | fix_getfrom_usage_in-2826094-3.patch | 1.93 KB | mbovan |
Comments
Comment #2
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedUpdated
getFrom()
usages and fixed the leftover. Let's check the test bot.Comment #3
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedOoops... Uploaded a correct patch.
Comment #8
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedFix for
MailhandlerWebTest
.Comment #10
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedGreen! Committed. :)
Comment #12
maxilein CreditAttribution: maxilein commentedThis 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();
Comment #13
maxilein CreditAttribution: maxilein commentedComment #14
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedHm, 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.