Problem/Motivation
When sending emails to a user, and if there's a plaintext field configured, Mimemail can send the username of that user, but it's using the internal username:
$address->getAccountName() rather than the more appropriate: $address->getDisplayName()
Steps to reproduce
Enable a plain-text configuration field, send an email to a user, ideally on a site that customises the display name.
Proposed resolution
Separate the logic for when to send using usernames, and then also change to using getDisplayName()
Remaining tasks
Needs some tests.
User interface changes
Emails received will probably use a username.
API changes
None.
Data model changes
None.
Comments
Comment #2
steven jones commentedComment #4
steven jones commentedHere's a patch that matches what's in the MR, since I know that some people like patches.
Comment #5
steven jones commentedComment #8
mark_fullmerYes -- good call! At this point, we should use
$address->getDisplayName()Merged & fixed!
Comment #10
klemendev commentedCould this introduce this bug? https://www.drupal.org/project/mimemail/issues/3549125