Installed the newest version of Mail Mime and Include. Error occurs when I try to send a test email from /admin/config/system/htmlmail/test. The result is no mail is sent. Tried reinstalling modules, checked that I have the PEAR Modules installed and that the include path is correct.
Fatal error: Call to undefined method Mail_mimePart::encodeHeader() in C:\xampp\htdocs\drupal\sites\all\modules\mailmime\mailmime.inc on line 779
Comments
Comment #1
pillarsdotnet commentedThe
Mail_mimePart::encodeHeader()function was introduced in version 1.6.1, released in 2006. If your copy lacks this function, it is over five years old and should be updated.See duplicate issue:
#1130890: Fatal error: Call to undefined method Mail_mimePart::encodeHeader() in mailmime.inc on line 784
I'm tempted to mark this "wont-fix" because I'm just not interested in supporting PEAR libraries over five years old.
However, if you come up with a patch that offers backwards-portability without sacrificing functionality, I'd be happy to review and commit it.
Comment #2
pillarsdotnet commentedAdded note to README and on project page.
I'd be interested in feedback if you have any.
Comment #3
travelerttYup, that was the problem. I'm using XAMPP 1.7.4, I assumed that it would be using the newest version of PEAR and Mail_Mime. Upgraded both and it's working perfectly. Is there any way that this module can do a version check on Mail_Mime during install? That would be a good feature enhancement, but I don't know if Drupal can do that or not. Thanks for the quick response!
Comment #4
pillarsdotnet commentedIt's easier to check for the function existence than the version number, which is stored differently depending on whether you downloaded via SVN or the
pearcommand-line tool.Added a check for
method_exists('Mail_mimePart', 'encodeHeader')inmailmime_check_requirements().Such checks really belong in
mailmime_requirements()but I've had to invent work-arounds because neither Drupal core nor Libraries API support PEAR libraries.Hmm... Something is wrong with drupal.org -- it won't let me create a 7.x-2.12 release.
Comment #5
pillarsdotnet commentedPostponed pending resolution of #1157144: Created git tag but cannot release corresponding version
Comment #6
pillarsdotnet commentedFixed in 7.x-2.13 release.