Problem/Motivation
I'm having an issue with defining the sender's name when sending emails through this module. Currently, when I send an email, the sender's name automatically uses the part of the email address before the @ symbol. For example, if the email address is support@example.com, the sender's name appears as "Support".
My question is, is there a way to define or customize how the sender's name shows, instead of it automatically using the part before the @ symbol?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screen Shot 2024-07-08 at 11.38.56 AM.png | 59.44 KB | chucksimply |
Issue fork amazon_ses-3454004
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
Comment #2
davisbenThat isn't currently an option, but it should be fairly easy to add.
Comment #4
davisbenI think this should do it. Give it a try and see if it meets your needs.
Comment #5
chucksimply commentedHey @davisben... I appreciate you working on this. Patched with the merge and working perfectly! Thanks again!
Comment #6
davisbenThanks for confirming! I'll fix the tests and get it committed.
Comment #7
chucksimply commentedThe patch doesn't play nice with Webform. If you set the "Sender From Name" in a webform email, the following errors occur.
Drupal\Core\Entity\EntityStorageException: Email ""WEBFORMSENDERNAME" <support@sitename.com>" does not comply with addr-spec of RFC 2822. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).and
Symfony\Component\Mime\Exception\RfcComplianceException: Email ""WEBFORMSENDERNAME" <support@sitename.com>" does not comply with addr-spec of RFC 2822. in Symfony\Component\Mime\Address->__construct() (line 54 of /vendor/symfony/mime/Address.php).I'm seeing a double quote "" before the sender name, not sure if this is relevant.
Comment #8
chucksimply commentedScreenshot attached showing where the sender name is set in the webform email config.
Comment #9
davisbenI made some changes so it plays nice with Webform, or any other module that sets a from address. Could you give it another test?
Comment #10
chucksimply commentedYes, looks to be working as expected. Thanks!
Comment #12
davisbenMerged.