Question

OS: Ubuntu Here's my code on the controller. Page just keeps on loading.

     $configs = array(
        'protocol'  =>  'smtp',
        'smtp_host' =>  'ssl://smtp.gmail.com',
        'smtp_user' =>  'email@gmail.com',
        'smtp_pass' =>  'email',
        'smtp_port' =>  '465'
    );
    $this->load->library('email', $configs);
    $this->email->from('VOTE VOTE , email@gmail.com');
    $this->email->to('email2@gmail.com');
    $this->email->subject('Registration Verification: Continuous Imapression');
    $this->email->message('Thanks for signing up!
    Your account has been created, you can login with the following credentials after you have activated your account by pressing the url');

    if ( $this->email->send()){
        echo "pass<br>";
    }else{
        echo 'fail<br>';

    }

The page just keeps on loading.

I've tried using Sendmail. It actually sends the email(based on the results, it actually returns true) but the problem is that I can't receive the mail. That's why I opted to use SMTP.

$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;

any suggestions? should I use a different protocol? hellppp

I already edited my php ini file:

(/etc/php5/apache2/php.ini)

extension=php_openssl.so
extension=php_sockets.so
Was it helpful?

Solution

insert this line after this

$this->load->library('email', $config);


$this->email->set_newline("\r\n");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top