I have installed the PEAR Mail MIME package and verified it on the command line. I have verified that the directory is in the path, and that I can create a mime message using php from the command line.

I have created a Drupal page with just phpinfo() in it and the path is in include_path.

But when I try to enable the module Mail MIME 7.x-2.6, I get the following error:

The required PEAR package Mail_Mime could not be found. The Mail MIME module has been disabled to avoid further errors. Please download and install the Mail_Mime package, then visit your Modules page to re-enable the Mail MIME module.

For now I'm assuming this is something I'm doing wrong, but I don't know what else to do. Any suggestions would be helpful.

Comments

pillarsdotnet’s picture

Status: Active » Postponed (maintainer needs more info)

What version of the PEAR Mail_Mime package do you have installed? The Mail MIME module requires 1.6.1 or later.

Specifically, the following include files are required:

  • Mail/mime.php
  • Mail/mimeDecode.php
  • Mail/mimePart.php
  • PEAR.php
  • PEAR5.php
drupjab’s picture

I have version 1.8.1 installed (latest stable release).

I see mime.php and mimePart.php in my local PEAR directory, but no the others.

Does that make any sense?

thanks,
J

pillarsdotnet’s picture

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

I see mime.php and mimePart.php in my local PEAR directory, but no the others.

Does that make any sense?

No.

The files mime.php and mimePart.php should not be in your PEAR directory; they should be in the Mail/ subdirectory of your PEAR directory.

All of the files I listed are required. In other words the following test code should run with no errors:

  require_once 'Mail/mime.php';
  require_once 'Mail/mimeDecode.php';
  require_once 'Mail/mimePart.php';
  require_once 'PEAR.php';
  require_once 'PEAR5.php';
drupjab’s picture

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

So I installed the "include" module (http://drupal.org/project/include) and re-installed Mail MIME and got this message:

Created include Mail/mimeDecode.php.
Created include PEAR5.php.

Seems to have worked. Will report back after more testing and close the issue if everything works.

pillarsdotnet’s picture

Title: Mail MIME doesn't recognize PEAR library as installed » Mail MIME dependencies are unclear.
Component: Code » Documentation
Assigned: Unassigned » pillarsdotnet
Category: support » task
Status: Postponed (maintainer needs more info) » Needs work

If you look in your "files" directory, you should see a subdirectory called "include".

Copy everything from the "include" subdirectory to your PEAR directory, and you should be able to uninstall the "include" module without any problems.

I will update the module documentation to clarify the exact file dependencies.

pillarsdotnet’s picture

Status: Needs work » Fixed

Fixed in development, and also on the project page.

I have revised the Requirement section as follows. Please let me know if you can think of any further improvements.

The following files, available from PEAR, must be installed and available somewhere on the include_path.

  • Mail/mime.php
  • Mail/mimeDecode.php
  • Mail/mimePart.php
  • PEAR.php
  • PEAR5.php

One way to satisfy this requirement is to run the following command from a Unix root shell prompt:

pear install -a Mail_Mime

Another way is to install and enable the Include module before enabling the Mail MIME module.

drupjab’s picture

I think that looks great. Thanks for all your help. Let me know if I can return the favor.

vacho’s picture

I have solved this whit "Include" module.
This module has created the files:
mime.php
mimeDecode.php
mimePart.php
in the path: sites/default/files/include/Mail

Status: Fixed » Closed (fixed)

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

danielgmc’s picture

Just FYI in case anyone else has this problem.

My system was missing Mail/mimeDecode.php even after running pear install -a Mail_Mime.

I also had to run pear install -a Mail_mimeDecode.

Then I could enable this module successfully.

pillarsdotnet’s picture

I'm rewriting MailMime to avoid the PEAR dependency. See #1333310: Rewrite and fork PEAR classes instead of subclassing.

tomfilepp’s picture

thanks for the tip, been googling for 20 minutes trying to figure out why this module was missing.