Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
SendGrid + CodeIgniter
/* application/config/email.php */
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
| SendGrid Setup
| All we have to do is configure CodeIgniter to send using the SendGrid
| SMTP relay:
$config['protocol'] = 'smtp';
$config['smtp_port'] = '587';
$config['smtp_host'] = '';
$config['smtp_user'] = 'your_sendgrid_username';
$config['smtp_pass'] = 'your_sendgrid_password';
/* application/controllers/welcome.php */
public function index()
$this->email->from('', 'John');
$this->email->subject('Test Email using SendGrid');
$this->email->message('This email was delivered by your friends at SendGrid');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.