CodeIgniter Email Preferences When Using Gmail As Mail Server

If you are developing web applications using CodeIgniter and you need to test an email feature but you don’t have a mail server, you can use your Gmail account or you can create a Gmail account specifically for your testing needs. You can then use the following preferences to successfully send an email using Gmail in your CodeIgniter applications.

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['smtp_user'] = 'username@gmail.com';
$config['smtp_pass'] = 'password';
$config['smtp_port'] = 465;
$config['newline'] = "\r\n";

Make sure to replace username with your real username and password with your real password.

One thought on “CodeIgniter Email Preferences When Using Gmail As Mail Server”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>