Ubercart and other modules work with the Mail system module. The Mandrill module can be used with Mail system but Mandrill wipes out the current settings in the mail_system variable and we have to reenter all the settings in Mail system. Mandrill could copy the approach used in Ubercart uc_store.install and other files to add and remove the Mandrill setting without wiping the other settings.
mandrill_disable(): Mandrill should check the default setting and not touch it if Mandrill is not the default. When Mandrill is the default, the code should be something like:
$mail_system = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
if ($mail_system['default-system'] == 'MandrillMailSystem'
or $mail_system['default-system'] == 'TestingMandrillMailSystem') {
$mail_system['default-system'] == 'DefaultMailSystem';
variable_set('mail_system', $mail_system);
}
The same type of change is needed in admin submit code.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mandrill-1820380.patch | 2.49 KB | peterx |
Comments
Comment #1
peterx commentedI tried a quick code change on our test system and include the patch. Only minimal testing.
Comment #2
ptmkenny commentedAnother patch was submitted in this issue:
http://drupal.org/node/1865418
Comment #3
ptmkenny commentedComment #4
gcbfixed in dev branch, will roll into next release. Thanks @peterx!