I use Mime Mail as a Rule Action.

Mime Mail has been running GREAT up until May 17. Then, all outgoing Mime mail e-mail stopped.

In Reports - Outgoing Mail Entries there remain notifications, but no email is sent.

For instance, there will be Mailkey "mimemail_rules_action_mail" but the "to" field is blank.

Following are the error messages from Watchdog

implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /path/sites/all/modules/mimemail/includes/mimemail.rules.inc on line 55.

array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /path/sites/all/modules/mimemail/includes/mimemail.rules.inc on line 77.

implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /path/sites/all/modules/mimemail/includes/mimemail.rules.inc on line 78.

The line 77 & 78 errors occur when the bcc recipient field is used, and the line 55 error occurs when the "to" field is used.

The line 55 error occurs whether the "to" recipient is a token or actual address.

Perhaps this is a module conflict because it had been working, I will check what modules were changed.

Comments

itserich’s picture

I upgraded to the latest dev version at the same time mail stopped being sent.

Is it possible to upload a prior dev version, I can not find them under "Releases" on drupal.

sgabe’s picture

It's not possible to downgrade to another development snapshot, since they are generated automatically from the Git repository and not stored. This is (one) why you need to make backups when you are updating your site!

However you can see the commits made and the issues committed since the previous version, so you can look for the culprit.

First, you should check the settings of the Rule and see what is the value of the to, cc and the bcc fields. Try to set up again the action.

sgabe’s picture

Title: EMail Not Sent as Part of Rules Action » Recipient input in Rules changed to textarea

I think you are using the development snapshot of Rules and encountered this error because Rules changed the recipient input from textfield to textarea in #448922: Make recipient input expandable. Mime Mail needs to adapt to this modification.

itserich’s picture

I am using Rules 6.x-1.4

Spending the day tryring to improve my backup process...

sgabe’s picture

Then I am wrong, and you should investigate further to identify the problem.

itserich’s picture

I had updated the following modules at the same time:

JQuery UI (upgrade from 1.6 to 1.7.3)
Private Message
Login One Time
Modalframe
Modalframe contrib

I disabled all of them except JQuery UI because so many modules depend on it.

I also enabled Compact Forms but doubt it was at the exact same time, though I don't remember when.

Suppose it could be any other module also because Mime mail was upgraded at the same time and it could be a conflict with an existing module.

I think I have learned to backup through command line...

itserich’s picture

Test messages sent from Message Settings - Test are delievered, though they do not show up in Reports - Outgoing Mail.

I reverted JQuery UI back from1.7.3 to 1.6 without success.

sgabe’s picture

Did you try to set up and save the Rule again?

gbrussel’s picture

Duplicate post. See #10.

gbrussel’s picture

Changing line #55 from:
$to = empty($settings['to']) ? $user->mail : implode(',', $settings['to']);
to
$to = (empty($settings['to']) ? $user->mail : $settings['to']);
fixes the issue for me, at least.

sgabe’s picture

Title: Recipient input in Rules changed to textarea » Recipient is not an array anymore
Version: 6.x-1.x-dev » 6.x-1.0-beta1
Category: support » bug
Status: Active » Fixed
sgabe’s picture

Priority: Normal » Major

We can consider this as a major bug.

esbon’s picture

I installed the latest dev of June 13 2011 and still got one error message:
warning: Invalid argument supplied for foreach() in sites/all/modules/mimemail/mimemail.inc on line 361.

sgabe’s picture

esbon’s picture

Thank, it is working again after the patch!

Status: Fixed » Closed (fixed)

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