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.
When the module is enabled, the default mail system is not set, while sending a test email does that.
Comment | File | Size | Author |
---|---|---|---|
#19 | smtp-enabling_module_does-2651976-19.patch | 3.19 KB | Arlina |
|
Comments
Comment #2
agialab CreditAttribution: agialab as a volunteer commentedI have created a simple patch for that - it sets the default system as 'SMTPMailSystem' when the module is enabled and 'php_mail' when it is disabled.
Comment #3
agialab CreditAttribution: agialab as a volunteer commentedComment #5
agialab CreditAttribution: agialab as a volunteer commentedComment #6
agialab CreditAttribution: agialab as a volunteer commentedComment #8
ptmkenny CreditAttribution: ptmkenny commentedI can confirm this bug. I enabled the module, configured my Mandrill SMTP info, turned SMTP "on" in the Install Options, and then sent a test mail-- which was sent from the server rather than the SMTP module.
Comment #9
estoyausenteI had the same issue. I don't know why I couldn't apply the patch in dev branch, git throw me an error.
I just rebuild the patch uploaded in #5 and now it work correctly and can be apply.
please review it.
Comment #10
ptmkenny CreditAttribution: ptmkenny commentedComment #11
estoyausenteAdd related issue. This patch seems to fix this other issue too.
Comment #12
estoyausenteComment #13
ptmkenny CreditAttribution: ptmkenny commentedI can confirm that this module correctly sets SMTP to the default when it is turned on and restores the default to php_mail when it is turned off.
Comment #14
Arlina CreditAttribution: Arlina at Chapter Three commentedAttached patch builds on the patch from #9 by estoyausente, but instead of restoring to the default "php_mail", it saves it to the config "prev_mail_system", as uninstall routine tried to.
Note: It requires the patch in https://www.drupal.org/node/2653338#comment-10802106 to fix the uninstall issues before testing this patch.
Comment #16
estoyausente@Arlina Maybe we can merge both patchs in order to pass the test and build a commitable patch.
Comment #17
Arlina CreditAttribution: Arlina at Chapter Three commentedGood idea @estoyausente. Attached patch merges #14 and https://www.drupal.org/node/2653338#comment-10802106 :)
Comment #18
estoyausenteIt seems that not working correctly:
Trying to send testmail using GMAIL as smtp server:
Fatal error: Cannot use object of type Drupal\Core\Config\Config as array in /home/rmx9j/www/sites/default/modules/smtp/src/Form/SMTPConfigForm.php on line 221
Comment #19
Arlina CreditAttribution: Arlina as a volunteer and at Chapter Three commentedJust ran into that as well. Attached is updated version of patch that fixes that, I was able to successfully configure an smtp inbox and send mail though it :)
Comment #20
estoyausenteThe patch is ok although I can't send the mail without apply this another patch: https://www.drupal.org/node/2611210
I hope that maintainer commit asap the 2-3 patch necessaries to use the module. Now it's imposible test patchs in simplytest.me because the module haven't all ok in the dev branch.
Comment #21
mikeegoulding CreditAttribution: mikeegoulding at Ashday Interactive Systems commentedThis patch worked for me as well. Same result as #20. I needed the other patch for mail to actually send.
Comment #22
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commentedComment #24
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commentedComment #25
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commented