Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 19th, 2013  |  syntax: PHP  |  size: 1.20 KB  |  views: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.             $this->load->library('email');            
  2.  
  3.             $config['protocol'] = "smtp";
  4.             $config['smtp_host'] = "mail.warrebuysse.be"; // Replace this with your host (hotmail/gmail/domain)
  5.             $config['smtp_port'] = "26"; // Replace this with your port
  6.             $config['smtp_user'] = "mail@warrebuysse.be"; // Replace with your email
  7.             $config['smtp_pass'] = "your password";
  8.             $config['charset'] = "utf-8";
  9.             $config['mailtype'] = "html";
  10.             $config['newline'] = "\r\n";
  11.    
  12.             $this->email->initialize($config);
  13.    
  14.             $this->email->from('mail@warrebuysse.be', 'Warre Buysse');
  15.             $list = array('mail@warrebuysse.be');
  16.             $this->email->to($list);
  17.             $this->email->subject('TESTING MAIL');
  18.             $this->email->message('<h1>TEXT MSG<h1>'); //Your cool html5 ;P
  19.             $this->email->set_alt_message(strip_tags('<h1>TEXT MSG<h1>')); //Only text
  20.    
  21.             if ( ! $this->email->send())
  22.             {
  23.             show_error($this->email->print_debugger());
  24.             } else {
  25.             echo('DONE');
  26.             }
  27.  
  28.             //Used this? Please tell me at twitter! @warrebuysse
clone this paste RAW Paste Data