I do not think that CodeIgniter has a build mechanism. What you can do is extend the CI email class and add a function to protect the _debug_msg
protected array.
If you look at the source of the email class, you will see that the print_debugger()
function converts the _debug_msg
array to a string. Therefore, if _debug_msg
has what you are looking for, you do not have to parse any string.
class MY_Email extends CI_Email { public function __construct() { parent::__construct(); } public get_msg() { if (count($this->_debug_msg) > 0) { return $this->_debug_msg; } else { return FALSE; } } }
Refer to the following link on how to extend the CI libraries http://codeigniter.com/user_guide/general/creating_libraries.html
source share