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

Files: 
CommentFileSizeAuthor
#7 1248050-fix-default-class-reverting-7.patch548 bytesBrian Altenhofel
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

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

Brian Altenhofel’s picture

Issue summary:View changes
Status:Needs work» Needs review
StatusFileSize
new548 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.