Hello there,

After installing the Simplenews and Mime modules for D7, I have been getting the following error when any sort of mail action is attempted on my website.

Warning: class_implements() [function.class-implements]: object or string expected in drupal_mail_system() (line 247 of /services4/webpages/util/p/e/peruschallenge.site.aplus.net/public/includes/mail.inc).
Exception: Class does not implement interface MailSystemInterface in drupal_mail_system() (line 252 of /services4/webpages/util/p/e/peruschallenge.site.aplus.net/public/includes/mail.inc).

I disabled and tried to uninstall those modules, but for some reason they didn't uninstall correctly and the error remains.

The forms were previously working fine. Any help is greatly appreciated.

Jonathan

CommentFileSizeAuthor
#4 mimemail.1052172_01.patch1.92 KBsgabe

Comments

sgabe’s picture

I just did a quick test with the latest development snapshot of Drupal 7 and I didn't encounter any error. Please post here the value of the mail_system variable.

burlap’s picture

I have a similar error. mail_system variable:
a:1:{s:8:"mimemail";s:14:"MimeMailSystem";}

burlap’s picture

Saving MimeMail configuration and setting it as a default mail system helped, but still there is something wrong here.

sgabe’s picture

Title: Installing mime screwed up drupal_mail_system ... can't uninstall module either » The default-sytem is missing from the mail_system variable
Category: support » bug
Status: Active » Fixed
StatusFileSize
new1.92 KB

Okay, I got it. We need to provide the proper default value for the $mail_system variable. The fix is committed to HEAD.

variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));

sw3b’s picture

Got the same bug and even when the module is remove, the mail system in Drupal is not working anymore.

# Warning : class_implements() [function.class-implements]: object or string expected dans drupal_mail_system() (ligne 247 dans /home/myaccount/public_html/mysite/includes/mail.inc).
# Exception : La classe n'implémente pas l'interface MailSystemInterface dans drupal_mail_system() (ligne 252 dans /home/myaccount/public_html/mysite/includes/mail.inc).

Need help on this one, is it possible to remove manually all what mime mail have done as configuration because once enable and disabled the mail system is crash !

sw3b’s picture

Status: Fixed » Needs work

Need rework !

sgabe’s picture

Steps to make it work:

  1. Disable the module.
  2. Uninstall the module.
  3. Install the module.

Make sure that you're using the latest dev.

Update: I forgot to add that you need to remove manually the mail_system variable from the variable table. Next time you install the module, it will correctly set the default mail system.

ksinc’s picture

I'm still trying to move forward with this issue.

I uninstalled mimemail, removed the directory, deleted the mail_system variable, downloaded the current dev, installed it and ran cron receiving the following message:
Error messageWarning: chdir() [function.chdir]: Result too large (errno 34) in _drupal_shutdown_function() (line 3073 of D:\webs\yourfb\includes\bootstrap.inc).

I ran cron again and it went away. ???

I created a newsletter. Sent. Status Pending. Ran Cron and it crashed with a white page - cannot display page, 500 error.

sw3b’s picture

@sgabe #9
Yo make my day ! I remove the variable mail_system and clear the cache and it work !

I also reinstall mime mail and it seems to be working correctly !
Thanks !

sgabe’s picture

@ksinc: Why do you think that error is related to Mime Mail?

ksinc’s picture

Because I never got that before and I was sending SimpleNews in plain text. What I changed to my environment was the procedure given.

I'm not making a conclusion, I'm just posting the results of the attempted procedure.

Reading #9 above I did not clear the cache, but I had deleted all my previous pending newsletters.

sgabe’s picture

@ksinc: How is your error message is the same as the one in this issue? I guess nohow. As you see sw3b encountered this exact problem and solved it with the above steps. If that doesn't help you, then you have another problem.

ksinc’s picture

I'm going to try the procedure again and clear the cache and see what happens. I'll report back positive or negative. Thanks! :)

sw3b’s picture

#13 make sure to clear cache after uninstalling module (deactivated module, uninstall, remove variable, delete files) and after re-enable it !

And by the way I also have Simple News install !!!

ksinc’s picture

I'm still in the weeds right now.

I uninstalled mimemail completely and tried to get back to just sending plaintext simplenews I'm getting undefined variable via_mimemail errors from simplemail.

Interestingly, I had no mail_system variable when I went back to remove it the 2nd time. So, maybe it was not recreated after I deleted it and reinstalled mimemail?

I did have a mimemail_engine variable.

I've turned the cache off for now.

MSG is as follows:
Notice: Undefined variable: via_mimemail in simplenews_mail_mail() (line 237 of D:\webs\yourfb\modules\simplenews\includes\simplenews.mail.inc).

sgabe’s picture

Status: Needs work » Fixed

@ksinc: You're definitely dealing with another issue. Furthermore I think Simplenews doesn't support Mime Mail on Drupal 7 just yet. I set this to fixed again. I suggest you to investigate further and (if needed) eventually open a new issue for your bug.

ksinc’s picture

@sgabe: You were right! the chdir() in bootstrap was a cron.php issue with my host access-denied on chdir() to DRUPAL_ROOT. I have no idea why it only surfaced as a crash vs. a warning in this scenario, but I hacked my bootstrap.inc and it worked.

Thanks for the help!

jonathanm’s picture

@sgabe

Hi guys,

Admitedly, I am not too technical. Here are the steps I have done, and I am still getting problems. Although the error message isn't showing. The forms just go to a blank white page and there are no emails being sent.

1. I disabled Simplenews and Mimemail.
2. I tried to uninstall them, but they weren't showing up in the uninstall list.
3. I reinstalled mimemail
4. I went to add the patch but noticed the new version of mimemail has the changes in it.
5. Cleared cache

So i still have the problem. Why can't I just uninstall mimemail and it goes away?

What changes did mimemail make on the core or core modules for this to happen?

Thanks for your help in advance.

sgabe’s picture

So i still have the problem.

Again, if you don't have the error message above (see the issue description), then you have another issue!

jonathanm’s picture

I changed browser and yes I am still getting the error.

Can you please tell me what I have to do to reverse the changes that Mime Mail made to something or how to uninstall the thing?

Thanks.

sgabe’s picture

Although the error message isn't showing.

I am still getting the error.

So, which is it, then? Because something is still not working for you, doesn't mean that it's the same issue. If you don't see the error message (you said that you don't), then you have another issue.

So, please, open a new issue, provide the value of the mail_system variable and details about your problem.

Anticosti’s picture

sub

AimAdvantage’s picture

Hi sw3b and sgabe-

where's the variable to delete in the tables? How do I find it and delete the right thing-

is that in the phpMyadmin (sql?)

I know how to get in there- just don't want to screw up a database- as I only have experience backing up, and restoring (and changing a few entries here and there)

Thanks
Aaron

(sub)

Status: Fixed » Closed (fixed)

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

sgabe’s picture

@jonathanm and AimAdvantage: Remove the record with mail_system name from the variable table of your site's database. You can use PhpMyAdmin for that, which is a very common administration tool for databases.