Related Articles

CodeIgniter is a free, open-source Web development library for the PHP programming language. The CodeIgniter packages offers a number of libraries for rapid deployment of interactive Web applications, including sending email through a Gmail account from Google. Sending website messages from your Gmail account can produce a personalized experience for your business customers and integrate with existing infrastructure, if you are already using a Gmail account for business correspondence.

1.

Enable SSL on your Web server to connect to Gmail's servers and send your password securely. Open "php.ini" on your Web server and uncomment the following line by removing the semicolon.

;extension=php_openssl.dll

2.

Create a new file named "email.php" using a text editor, such as Notepad. Place "email.php" in your CodeIngiter "application/config" directory. This overrides the email settings for CodeIgniter's email class.

3.

Write the following code in the email.php file, replacing the placeholders with the specific information for your Gmail account.

Send an email via any PHP file on your server using the following code. The email.php file is imported automatically when the CodeIgniter email library is loaded, importing your configuration settings.

References (3)

About the Author

Chris Daniels covers advances in nutrition and fitness online. Daniels has numerous certifications and degrees covering human health, nutritional requirements and sports performance. An avid cyclist, weightlifter and swimmer, Daniels has experienced the journey of fitness in the role of both an athlete and coach.

Photo Credits

Stockbyte/Stockbyte/Getty Images

bibliography-iconicon for annotation tool Cite this Article

Choose Citation Style

Daniels, Chris. "How to Send Email Through Gmail With CodeIgniter." Small Business - Chron.com, http://smallbusiness.chron.com/send-email-through-gmail-codeigniter-50589.html. Accessed 14 September 2019.

Daniels, Chris. (n.d.). How to Send Email Through Gmail With CodeIgniter. Small Business - Chron.com. Retrieved from http://smallbusiness.chron.com/send-email-through-gmail-codeigniter-50589.html