Download & Extend

Load Mimemail library

Project:PHPMailer
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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.

Comments

#1

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
phpmailer-1162666.patch413 bytesIgnoredNoneNone

#2

Version:6.x-2.x-dev» 6.x-3.x-dev

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.

AttachmentSizeStatusTest resultOperations
phpmailer.mimemail.inc_.2.patch568 bytesIgnoredNoneNone