Reputation: 13
I am beginner with codeiginter and I am not understanding how to send email. Please anyone can help? Thanks in advance.
$config = Array(
'mailtype' => 'html',
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'aaa');
$this->email->to('[email protected]');
$this->email->subject('This is an email test');
$this->email->message('It is working. Great!');
$result = $this->email->send();
echo $this->email->print_debugger();
Upvotes: 0
Views: 236
Reputation: 832
$this->email->initialize($config);
$this->email->from($from);
$this->email->to($to);
$this->email->subject($subject);
$this->email->message($mailContent);
($this->email->send())
Upvotes: 1
Reputation: 7055
$this->load->library('email');
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->bcc('[email protected]');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
refrence #Codeigniter Email
Upvotes: 0