Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function send_mail(){
- $ci = get_instance();
- $ci->load->library('email');
- $config['protocol'] = "smtp";
- $config['smtp_host'] = "ssl://smtp.gmail.com";
- $config['smtp_port'] = "465";
- $config['smtp_user'] = "*******@gmail.com";
- $config['smtp_pass'] = "*******";
- $config['charset'] = "utf-8";
- $config['mailtype'] = "html";
- $config['newline'] = "\r\n";
- $pesan =" isi email ";
- $ci->email->initialize($config);
- $ci->email->from('*********@gmail.com', '******* Pekanbaru'); /* pengirim */
- $list = array('*******@gmail.com'); /* penerima */
- $ci->email->to($list);
- $ci->email->subject('L*******');
- $ci->email->message($pesan);
- if($this->email->send()){
- echo 'email sent';
- } else{
- show_error($this->email->print_debugger());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement