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.
I ran into an issue where the HTML part of the email was being escaped and tracked this down to swiftmailer. Then I noticed you were handling swiftmailer as a special case specially for this, but the detection was not right. I assume this could be to an older configuration schema.
Another proposed change is to change the email key to use underscore instead of dots. It's much more friendly towards other modules if they use the email key as a config entry, such as MailSystem+Swiftmailer.
Comment | File | Size | Author |
---|---|---|---|
#6 | webform-fix_mailsystem_detection-2884410-6.patch | 2.21 KB | hanoii |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI think \Drupal\webform\Plugin\WebformHandler\EmailWebformHandler::getMailSystemSender needs to be updated.
Comment #3
hanoiiAttached is the patch with the proper detection.
I also changed the email key to use underscore instead of dots. I looked and I didn't find any reference to dots not available as email keys, but this affects how mailsystem settings are stored. It doesn't really work.
Besides, dots are not really supported as configuration keys: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21...
I think changing your module's email key is safest/possible easiest and hopefully harmless and will prevent these kind of issues with others storing emails keys as configurations.
Comment #4
hanoiiComment #6
hanoiiFix test.
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedLooks fine to me.