Welcome Guest, Not a member yet? Register   Sign In
Loading a library inside a helper
#4

[eluser]cideveloper[/eluser]
This works for me. How are you calling the helper? Does your email work if you just have it in the controller?

application/helpers/new_help.php

Code:
function meow($result = '') {
    $CI =& get_instance();
    $CI->load->library(array('email'));
    $CI->email->from('[email protected]','Name');
    $CI->email->to('[email protected]');
    $CI->email->subject('testing');
    $CI->email->message('Works! damn it...');
    $CI->email->send();
    return $result . '<br />' . $CI->email->print_debugger();
}

Method in controller

Code:
function libinhelper() {
        $this->load->helper('new');
        echo meow('Does This Work');
    }


Messages In This Thread
Loading a library inside a helper - by El Forum - 01-20-2011, 05:21 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 03:01 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 03:31 PM
Loading a library inside a helper - by El Forum - 01-21-2011, 04:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB