Welcome Guest, Not a member yet? Register   Sign In
ion_auth send mail not working
#1
Sad 
(This post was last modified: 12-20-2016, 12:46 AM by meSmashsta.)

I think I got the configuration correct, but it's not working. After I call the register method it fails to send the mail verification.

PHP Code:
$config['email_activation'] = TRUE;
$config['use_ci_email'] = TRUE;
$config['email_config'] = array(
    
'mailtype' => 'html',
 
       "protocol" => "smtp",
        
"smtp_port" => 465,
 
       "smtp_host" => "smtp.gmail.com",
 
       "smtp_user" => "***@gmail.com",
 
       "smtp_password" => "***"
); 
It's returning a boolean, a false boolean.
Quote:bool(false)
Reply
#2

(12-19-2016, 11:46 PM)meSmashsta Wrote: I think I got the configuration correct, but it's not working. After I call the register method it fails to send the mail verification.

PHP Code:
$config['email_activation'] = TRUE;
$config['use_ci_email'] = TRUE;
$config['email_config'] = array(
    
'mailtype' => 'html',
 
       "protocol" => "smtp",
 
       "smtp_port" => 465,
 
       "smtp_host" => "smtp.gmail.com",
 
       "smtp_user" => "***@gmail.com",
 
       "smtp_password" => "***"
); 
It's returning a boolean, a false boolean.
Quote:bool(false)

Solved it! I used this configuration instead.

PHP Code:
$config["email_config"] = array(
 
   'protocol'  => 'smtp',
 
   'smtp_host' => 'ssl://smtp.googlemail.com',
 
   'smtp_port' => '465',
 
   'smtp_user' => '***@gmail.com',
 
   'smtp_pass' => '***',
 
   'mailtype'  => 'html',
 
   'starttls'  => true,
 
   'newline'   => "\r\n"
); 
Reply
#3

(This post was last modified: 12-20-2016, 01:44 AM by Diederik.)

Try sending a regular test email
PHP Code:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'xxxx.xxxx.net';
$config['smtp_user'] = '<username>';
$config['smtp_pass'] = '<password>';
$config['smtp_port'] = 465;
$config['smtp_timeout'] = 30;
$config['charset'] = 'utf-8';
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$this->load->library('email'$config);
$this->email->initialize($config);
$this->email->from('<from-address>');
$this->email->to('<to-address>');
$this->email->subject('Test email');
$this->email->message('Test email');
if(!
$this->email->send()){
    
print_r($this->email->print_debugger(), true);

Reply




Theme © iAndrew 2016 - Forum software by © MyBB