Fixing HTML Mime Mail so it works with php 4.4.x
I recently migrated to a new web server at work that is running Ubuntu Server 6.06.1 LTS which has PHP 4.4.2. The old server was running PHP 4.3.10, so upgrading from PHP 4.3 to PHP 4.4 caused HTML Mime Mail to give notices when running in the website with error_reporting(E_ALL).
It took me awhile to debug the notices so I thought I would save someone else the trouble who might be googling for an answer. At any rate the following are the changes I had to make.
In RFC822.php add "$comments = array();" after line 566.
In htmlMimeMail.php on line 455 & 470 change the line to "$return = &$obj->addSubpart('', $params);" by adding a "&" in front of "$obj->".
In smtp.php change line 94 to the following:
$return = $this->auth ? $this->ehlo() : $this->helo();
return $return;
I would submit a patch to Richard Heyes the author but I didn't seen anywhere on his site that you could submit patches.
Related tags: PHP
- Save this article for later, bookmark it!
- del.icio.us digg newsvine blinklist magnolia
Comments are closed.
Comments have been close for this post.
Latest Photos
Good Reading
- Mark Cuban's 12 Rules for Startups | Entrepreneur.com
- Welcome to Spreedly! | Spreedly
- Recurring Billing, Subscription Billing, Web 2.0 and SaaS Billing - Chargify
- Stripe
- The Best Exercise for Legs and Butt: Dumbbell Squats - YouTube
- Tips & tools for journalists who want to learn programming skills | Poynter.
Comments
Thank you so much for this. It took me a whole evening figuring out, why I could not send HTML with embedded images.
BJ, Glad I could help!
i still can't send html with embed images seems like the images not encoded (?) any hints?