Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: bsse0
- * Date: 4/8/2018
- * Time: 8:01 PM
- */
- class Email extends CI_Controller
- {
- public function index(){
- $config = array('protocol' => 'smtp',
- 'smtp_host' => 'ssl://smtp.googlemail.com',
- 'smtp_port' => 465,
- 'smtp_user' => 'sahashaishab@gmail.com',
- 'smtp_pass' => 'pass'
- );
- $this->load->library('email',$config);
- $this->email->set_newline("\r\n");
- $this->email->from('sahashaishab@gmail.com','saha');
- $this->email->to('bsse0834@iit.du.ac.bd');
- $this->email->subject('Mail');
- $this->email->message('HAla ai na mail dilam');
- if($this->email->send()){
- echo 'sent successfully';
- }else{
- show_error($this->email->print_debugger());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement