From 96c9f3ecc2900f132dda3cf3627666f777eb2b08 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Wed, 12 Feb 2014 08:19:51 +0200 Subject: [PATCH] A new release, version: 1.1.2. --- README.md | 4 ++-- libraries/MY_Email.php | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b15c196..9dcf2ac 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ A CodeIgniter compatible email-library powered by PHPMailer =========================================================== -Version: 1.1.1 +Version: 1.1.2 Author: Ivan Tcholakov , 2012-2014. License: The MIT License (MIT), http://opensource.org/licenses/MIT -Tested on CodeIgniter 3.0-dev (January 26th, 2014) and with PHPMailer Version 5.2.7 (September 12th, 2013). +Tested on CodeIgniter 3.0-dev (February 12th, 2014) and with PHPMailer Version 5.2.7 (September 12th, 2013). Installation ------------ diff --git a/libraries/MY_Email.php b/libraries/MY_Email.php index 6f3c7f0..9e81b18 100644 --- a/libraries/MY_Email.php +++ b/libraries/MY_Email.php @@ -2,12 +2,12 @@ /** * CodeIgniter compatible email-library powered by PHPMailer. - * Version: 1.1.1 + * Version: 1.1.2 * @author Ivan Tcholakov , 2012-2014. * @license The MIT License (MIT), http://opensource.org/licenses/MIT * @link https://github.com/ivantcholakov/codeigniter-phpmailer * - * Tested on production sites with CodeIgniter 3.0-dev (January 26th, 2014) and + * Tested on production sites with CodeIgniter 3.0-dev (February 12th, 2014) and * PHPMailer Version 5.2.7 (September 12th, 2013). */ @@ -449,16 +449,10 @@ public function message($body) { if ($this->mailer_engine == 'phpmailer') { $this->phpmailer->Body = $body; - - if ($this->mailtype == 'html') { - $this->phpmailer->AltBody = $this->_get_alt_message(); - } - - } else { - - parent::message($body); } + parent::message($body); + return $this; } @@ -583,6 +577,10 @@ public function send($auto_clear = true) { if ($this->mailer_engine == 'phpmailer') { + if ($this->mailtype == 'html') { + $this->phpmailer->AltBody = $this->_get_alt_message(); + } + $result = (bool) $this->phpmailer->send(); if ($result) {