There's a Mimemail API change starting with #808518: API change: Split mail preparation from sending that allows modules to send already prepared messages using the new function mimemail_send_message(). If a module use this function to send messages from a queue with PHPMailer will end with a fatal error Call to undefined function mimemail_rfc_headers() in /home/clau/slideme/code/sites/all/modules/phpmailer/includes/phpmailer.mimemail.inc on line 80. This happens because the Mimemail library sites/all/modules/mimemail/mimemail.inc is not loaded for other mailengines than Mimemail.

The PHPMailer implementation for hook_mailengine() invoke mimemail_phpmailer_send() ant that is using mimemail_rfc_headers().

We need to include the Mimemail library.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea’s picture

Status: Active » Needs review
FileSize
413 bytes

Here's a patch that explicitly include the library...

sun’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
FileSize
568 bytes

I'm not sure whether this is still an issue - the default mimemail_prepare_message() implementation seems to load mimemail.inc.

Nevertheless, slightly improved patch attached.

claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

Common!

sun’s picture

Title: Load Mimemail library » Fatal error: Call to undefined function mimemail_rfc_headers()
Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

  • Commit adec2e6 on 7.x-3.x authored by claudiu.cristea, committed by sun:
    - #1162666 by sun, claudiu.cristea: Fixed Fatal error: Call to undefined...

Status: Fixed » Closed (fixed)

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