Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

Error with email class in CI 3.1.8

$
0
0
Hey everybody.

I'm trying to use email class as usual.

I have loaded the email library in the autoload.php and made an email.php file in my config folder and in my controller trying to send() the email.

But I get Error "NOT" on the browser, rather in the log file. I don't have this problem with CI 3.1.5 by the way!
Does anyone have any idea?

config > email.php
PHP Code:
defined('BASEPATH') OR exit('No direct script access allowed');
$config['protocol']    = 'smtp';
$config['smtp_host']    = 'mail.mydomain.com';
$config['smtp_port']    = '26';
$config['smtp_timeout'] = '7';
$config['smtp_user']    = 'myusername';
$config['smtp_pass']    = 'mypassword';
$config['charset']    = 'utf-8';
$config['newline']    = "\r\n";
$config['mailtype'] = 'html';
$config['validation'] = TRUE

controller
PHP Code:
$message $this->load->view('edm/verification'''TRUE);
$this->email->from($this->config->item('from'), $this->config->item('appName'));
$this->email->to($email);
$this->email->subject('Welcome to '.$this->config->item('appName'));
$this->email->message($message);

if( ! 
$this->email->send()):
 
$this->session->set_flasdata('error'$this->lang->line('unableSendingEmail'));
endif; 

log file
Code:
ERROR - 2018-04-04 01:49:43 --> Severity: Error --> Call to a member function from() on string /home1/xxx/public_html/myProject/application/controllers/User.php 129

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>