PHPMailer Class Bug Fix!
Posted on April 2, 2007
Filed Under Design |
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.
Shopping Cart
Shopping Cart
Visit the shop
Recently
- Realtor Blogs Themes - The Brokers Edge
- WP Featured Listings Plugin Download
- AWBS Template Tool
- Kissing Freelance Goodbye!
- NEW Production Workstation
- The Spin on Vapor-Ware
- No Rivalry! Open Realty EZ Pro Realty
- Joomla and AWBS Bridge
- Updating - Upgrading to WordPress 2.5
- WordPress 2.5 Released!
Categories
- Code Snippets
- Design
- Open Realty
- Portfolio
- Products
- Products in Review
- Products in Review
- Professionals In Review
- Real Estate News
- Real Estate Websites
- Technical Resources
- Template Design Kit
- Week in Review
- WordPress Wisdom
Archives
- 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