Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function sendMail(){
- $config = array(
- 'protocol'=>'smtp',
- 'smtp_host'=>'ssl://smtp.gmail.com',
- 'smtp_port'=>465,
- 'smtp_user'=>'********@gmail.com',
- 'smtp_pass'=>'*********',
- 'mailpath'=> "/usr/sbin/sendmail",
- 'mailtype'=>'html',
- 'charset' => 'utf-8',
- 'send_multipart'=>FALSE
- );
- $this->load->library('email',$config);
- $this->email->initialize($config);
- $this->email->set_newline("rn");
- $this->load->library('encrypt',$config);
- $this->email->from('******@gmail.com');
- $this->email->to('******@gmail.com');
- $this->email->cc('******@gmail.com');
- $this->email->subject('Email Test');
- $this->email->message('Testing the email class.');
- if($this->email->send()){
- echo "Email sent success";
- }else{
- show_error($this->email->print_debugger());
- }
- }
Add Comment
Please, Sign In to add comment