I have configured HTMLMail to work with SMTP by following the instructions here: http://drupal.org/node/1200142. Now when I send a test email, everything works correctly.

After I visit admin/config page, mail doesn't work any more. The reason is that admin/config path triggers hook_requirements and htmlmail_requirements changes the variable "mail_system" so that it doesn't work with SMTP any more.

Comments

pillarsdotnet’s picture

Assigned: Unassigned » pillarsdotnet
Status: Active » Needs review
StatusFileSize
new1.63 KB

(looking..)

Yeah, it does. I put that line in because a lot of 7.x mail modules unconditionally set mail_system to point to their own class, and I wanted the HTML Mail test page (at least) to test the HTML Mail class.

I suppose I should move the "Is the HTML Mail module sending mail via its own class?" to the test mail page, and make the reset optional.

(clickety...)

Okay; try this patch. If it works for you, I'll push it to a new release.

pillarsdotnet’s picture

Status: Needs review » Postponed (maintainer needs more info)

Anyone?

ccoppen’s picture

Applied patch to 7.x-2.61 and got the following in the log with no messages sent. Even smtp is not sending a test message now.

First message:

Recoverable fatal error: Argument 1 passed to mailsystem_set() must be an array, string given, called in /web/drupal/sites/all/modules/htmlmail/htmlmail.admin.inc on line 287 and defined in mailsystem_set() (line 219 of /web/drupal/sites/all/modules/mailsystem/mailsystem.module).

Second:

Warning: Invalid argument supplied for foreach() in mailsystem_set() (line 221 of /web/drupal/sites/all/modules/mailsystem/mailsystem.module).

Third:

Warning: array_merge(): Argument #2 is not an array in array_merge() (line 229 of /web/drupal/sites/all/modules/mailsystem/mailsystem.module).

Fourth and final:

Notice: Undefined index: htmlmail in htmlmail_test_form() (line 262 of /web/drupal/sites/all/modules/htmlmail/htmlmail.admin.inc).

I've been having issues with cleanly sending html emails for simplenews and keep getting message body empty and thought this might help, but now it's only broken even more stuff.

Modules used:
HTML Mail: 7.x-2.6.1
Mail Mime: 7.x-2.15
Mail System 7.x-2.30
Simplenews 7.x-1.x-dev
SMTP Authentication Support 7.x-1.x-dev

With the appropriate patches to allow for inter-cooperation.

ccoppen’s picture

Just an update to say that I switched to the supported versions of said modules, applied the patch to get smtp to play well and applied this patch and still getting the above errors.

pillarsdotnet’s picture

StatusFileSize
new2.12 KB

Sorry; here's a better patch.

ccoppen’s picture

Well, that seemed to fix a whole lot of problems I've been having. Time to do some more tests, however.

Still getting the following:

Notice: Undefined index: htmlmail in htmlmail_test_form() (line 262 of /web/drupal/sites/all/modules/htmlmail/htmlmail.admin.inc).

But it's not fatal, thankfully.

pillarsdotnet’s picture

StatusFileSize
new2.22 KB

Fix for the undefined index error.

ccoppen’s picture

Works. Now to figure out my other problems dealing with the templates in a custom theme.

pillarsdotnet’s picture

Status: Postponed (maintainer needs more info) » Fixed

Released 7.x-2.62.

Thanks very much for your help in testing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.