I' ve configured MailSystem and HTMLMail so that my "Site-wide default MailSystemInterface class" and "HTML Mail module class"
are both "HTMLMailSystem__SmtpMailSystem".

However, if I do a cache clear or just leave the mail system settings page admin/config/system/mailsystem the HTML Mail module class reverts back to HTMLMailSystem and I cannot send mail. So long as I stay on the page or do not clear the cache its possible to send mail.


#7 1248050-fix-default-class-reverting-7.patch548 bytesBrian Altenhofel
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


pillarsdotnet’s picture

Status: Active » Needs work

Working on this -- will report back soon.

SolomonGifford’s picture

any update?

trajedy’s picture


trajedy’s picture

progress report?

kehrin’s picture


kressin’s picture


Brian Altenhofel’s picture

Issue summary: View changes
Status: Needs work » Needs review
548 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View

The issue here is that when checking that classes still exist, the module automatically restores the default if it encounters a class that does not exist. "mailsystem_theme" is part of the variable that stores mailsystem settings, so when it gets to that key (whose value is never going to be a class) it restores the default.

Brian Altenhofel’s picture

Status: Needs review » Needs work

Er... maybe not quite. Had this issue on multiple sites and this resolved it, but looking through the rest of the module it looks like "mailsystem_theme" should not even have ever been set within the variable holding the array of classes. So not sure when that issue was introduced.

However, I do think there needs to be some better checking done where the default is reverted in that loop.