Simple Invoice, Gmail/Google Apps, SMTP and PHP

Using Gmail as an SMTP server can be a pain if you don’t know what you are looking for.  Fortunately, there are some decent tutorials online that can get you there….more or less.

I just wanted to recap my experience when trying to use Google Apps as my SMTP server when setting up Simple Invoice…..

1) Get the latest PHPMailer from http://phpmailer.worxware.com/.  Install accordingly.

2) Compile OpenSSL for PHP.  If on windows simply delete the semi-colon (;) in front of ;extension=php_openssl.dll in php.ini

3) When making calls to phpmailer, the host should be ssl://smtp.gmail.com, the port should 465, username should be your full email address and of course your password.   If the phpmailer version requires the input, SMPT_AUTH should be true.

That should be it.

For those using Simple Invoice, you can set your config.ini file to look like this:

email.host = ‘ssl://smtp.gmail.com’
email.smtp_auth = true
email.username =  test@gmail.com
email.password =  password
email.smtpport = 465
email.secure       =
email.ack     = true

Hope that helps someone.  If you have any questions, just comment and I’ll get back with you.