PHPMailer support for Libraries API!
markus_petrux - August 29, 2009 - 14:43
| Project: | PHPMailer |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | Libraries |
Description
http://drupal.org/project/libraries
And this would br great if modules such as Messaging framework could depend on this module as well. See: #541938: using PHPMailer twice crashes messaging_mailer.

#1
Here's a patch that tries to use Libraries API to get the path to PHP Mailer class. It also implements hook_requirements('install'), and provides a watchdog error in case the library was not loaded successfully.
#2
Patch updated. This one provides backwards compatibility for existing installations of PHPMailer module. It first attempts the Libraries API path, then tries to find PHPMailer in the 'phpmailer' subdirectory of the module.
#3
Nice! :)
As mentioned elsewhere, I'll have a look at this after DC Paris... Hope to meet you there!
#4
Sadly I was not able to attend because that week we were upgrading our site infrastructure. We had to move 4 boxes from their current rac to another and install new boxes in place, and I had to coordinate this tasks with our hosting provider, then install the OS and set the new boxes up. That's part of the things we're doing during the latest stage of our migration to Drupal. I'm very busy here because I have to deal with all server administration tasks as well as development. Too busy I think.
I would have loved to attend, but it was not possible. :(
On the other hand, I'll try to visit SF. Our site will already be up and running Drupal, finally. It's been a couple of years or so working on that direction.
#5
tagging
#6
Re-rolled.
#7
Thanks for the patch!
I created the folder for phpmailer in my libraries folder. I applied the patch. Then I deleted the files from the original phpmailer folder inside of the module. Everything seems to be working fine, no errors and no warnings.
Nice Job!
#8
Thanks for your persistence, Markus!
Rerolled and committed to HEAD and the brand new 3.x branch, primarily because if you submit the modules page after applying the patch and did not download the libraries module at the same time, Drupal silently disables phpmailer.
#9
Sorry, I forgot to change the title ;)
#10
lol, thanks!
#11
Automatically closed -- issue fixed for 2 weeks with no activity.