Had to play with this a little bit to get it to work. Have very simply requirements and just wanted to ensure the manager could send out the "forgotten password" email if I ever forgot it. Here were my settings:
mail_smtp_auth Yes
mail_smtp_hosts smtp.gmail.com
mail_smtp_pass [password]
mail_smtp_port 465
mail_smtp_prefix ssl
mail_smtp_user [
[email protected]]
mail_user_smtp Yes
The two pieces that tripped me up was the "prefix" (SMTPSecure) -- I was looking around to see where you set it for ssl and just missed this one. The second part was the port -- I was trying 587 until I found a reference to 465.
At any rate, with these settings I was sending email through Gmail from the manager on my barebones Ubuntu server (ie. doesn't have sendmail).