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.

emk

CommentFileSizeAuthor
#7 1248050-fix-default-class-reverting-7.patch548 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pillarsdotnet’s picture

Status: Active » Needs work

Working on this -- will report back soon.

SolomonGifford’s picture

any update?

trajedy’s picture

subscribe

trajedy’s picture

progress report?

kehrin’s picture

bump

kressin’s picture

subscribe

Anonymous’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
548 bytes

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.

Anonymous’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.