views:

209

answers:

2

hi guys,

how do I use googleapps email service to send mail in codeigniter using the email library?

what settings do I use to make my app from within codeigniter since the email class kinda prefers smtp and I was going through the clients googleapps account and I can't find any place with settings for smtp. Any clues?

God Bless

A: 

Right you don't find it because CodeIgniter uses the "mail" PHP function.

For some reasons only the most drunken PHP core developer knows about - this function do not support SMTP and worse even the admin can't configure SMTP usuage on Unix (it is possible to do this on windows - making the PHP design look even more crazy).

There are a few SMTP libraries out there that can handle SMTP Email, just use them

http://pear.php.net/package/Mail http://sourceforge.net/projects/phpmailer/ http://swiftmailer.org/

or the Email classes from the Zend Framework which are uncoupled from the rest so easy to use with CodeIgniter.

Lothar
A: 

Here is a blog post detailing instructions: http://joelg.info/sending-email-with-gmail-using-the-codeignite

Extract From link:

Why send email with Gmail rather than the server's SMTP configuration? There are a number of advantages I see for doing this: Ability to develop locally and test email sending functionality without going to lengths to setup a local mail server. Ability to utilise Google Apps emails to send email from emails which are on your own domain. Ability to have a reference of the mail you send using this method in the "sent" folder on your Gmail account.

theraven