Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: bsse0
  5. * Date: 4/8/2018
  6. * Time: 8:01 PM
  7. */
  8.  
  9. class Email extends CI_Controller
  10. {
  11.  
  12. public function index(){
  13. $config = array('protocol' => 'smtp',
  14. 'smtp_host' => 'ssl://smtp.googlemail.com',
  15. 'smtp_port' => 465,
  16. 'smtp_user' => 'sahashaishab@gmail.com',
  17. 'smtp_pass' => 'pass'
  18. );
  19.  
  20. $this->load->library('email',$config);
  21. $this->email->set_newline("\r\n");
  22. $this->email->from('sahashaishab@gmail.com','saha');
  23. $this->email->to('bsse0834@iit.du.ac.bd');
  24. $this->email->subject('Mail');
  25. $this->email->message('HAla ai na mail dilam');
  26.  
  27. if($this->email->send()){
  28. echo 'sent successfully';
  29. }else{
  30. show_error($this->email->print_debugger());
  31. }
  32. }
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement