Skip to content

Instantly share code, notes, and snippets.

@back2arie
Created January 4, 2014 11:15
Show Gist options
  • Save back2arie/8254343 to your computer and use it in GitHub Desktop.
Save back2arie/8254343 to your computer and use it in GitHub Desktop.
<?php
class Email extends Controller {
function index()
{
$this->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "smtp.mailserver.net";
$config['smtp_port'] = "25";
$config['smtp_user'] = "kalkun@mailserver.net";
$config['smtp_pass'] = "Password";
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$this->email->initialize($config);
$this->email->from("kalkun@mailserver.net", 'Your Name');
$this->email->to('someone@example.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment