| 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
Here's a patch that explicitly include the library...
#2
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.