Blogs
I figured out how to do this when I was testing the message board subscriptions and the web form portlet.
Configure your ROOT.xml to look like this:
name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.imap.host="localhost"
mail.pop.host="localhost"
mail.store.protocol="imap"
mail.transport.protocol="smtp"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.starttls.enable="true"
mail.smtp.user="username"
password="password"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>
Of course, don't forget to change username and password to your gmail username and password.
Do not add @gmail.com to your username. Just your username is fine.
Now Liferay will be able to send out emails using your gmail account.
Test it by using the web form portlet. Make sure to configure the portlet to send the web form info to the email address you want. Submit your form and you should get an email from the gmail account you just set up.