PHPMailer Class Bug Fix!
Posted on April 2, 2007
Filed Under Design | 2 Comments
PHPMailer e-mail class is likely one of the most popular e-mail classes in use on the web today. Written by Brent R. Matzelle, many open source projects use the phpmailer class because of its clean structure and ease of use.
Recently an associate of mine discovered that errors can be produced when the class is used in applications which feature a CC or BCC for emailing and subsequently modified the code to accommodate a solution. Now since this class is used in things like Joomla and other products I tend to favor, I figured I’d publish a copy here for your use. You can find the original PHPMailer on the source forge site.
What has been modified is between lines 786 – 796 of the code.
//Modifications Begin Here
// sendmail and mail() extract Cc from the header before sending
if((($this->Mailer == “sendmail”) || ($this->Mailer == “mail”)) && (count($this->cc) > 0))
$result .= $this->AddrAppend(“Cc”, $this->cc);
// sendmail and mail() extract Bcc from the header before sending
if((($this->Mailer == “sendmail”) || ($this->Mailer == “mail”)) && (count($this->bcc) > 0))
$result .= $this->AddrAppend(“Bcc”, $this->bcc);
if(count($this->ReplyTo) > 0)
$result .= $this->AddrAppend(“Reply-to”, $this->ReplyTo);
//End Modifications
You can download the entire modified script here class.phpmailer.fixed.zip
Comments
Leave a Comment
If you would like to make a comment, please fill out the form below.
Recently
- Open-Realty® Moves To Commercial Model
- Aged Domains For Sale
- Break Time Away From This Business.
- I am taking a break from freelance
- OpenRealty Paid Support
- XML Feed Templates Download
- OpenRealty Data Icon Tutorial
- Recovering or Creating Joomla Administrator Account Password
- Hide Null or Empty Value Fields
- WP Menu Creator for Theme Developers
Categories
- Adobe Dreamweaver
- Announcements
- Code Snippets
- Design
- General
- Joomla CMS
- Portfolio
- Products
- Products in Review
- Professionals In Review
- Real Estate News
- Real Estate Scripts
- Real Estate Websites
- Technical Resources
- Template Design Kit
- WordPress Wisdom
Archives
- June 2010
- April 2010
- March 2010
- January 2010
- September 2009
- August 2009
- July 2009
- June 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
class.phpmailer.fixed.zip
Not Found, Error 404
The page you are looking for no longer exists.
I’ll fix that now