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.

Issue fork mimemail-3388498

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Steven Jones created an issue. See original summary.

steven jones’s picture

Assigned: Unassigned » steven jones
Issue summary: View changes

steven jones’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.1 KB

Here's a patch that matches what's in the MR, since I know that some people like patches.

steven jones’s picture

Assigned: steven jones » Unassigned

mark_fullmer made their first commit to this issue’s fork.

  • steven jones committed c8765a0a on 2.0.x
    Issue #3388498: Use getDisplayName and send the account information.
    
mark_fullmer’s picture

Status: Needs review » Fixed

Yes -- good call! At this point, we should use $address->getDisplayName()

Merged & fixed!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

klemendev’s picture

Status: Fixed » Closed (fixed)

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