7/23/2012

How to get the configured SMTP Host of Liferay

This is a simple one but I want to keep it so that I don´t have to look it up again in the future.
This is how you get the SMTP host that is configured in Liferay
String smtpHost = PrefsPropsUtil.getString(PropsKeys.MAIL_SESSION_MAIL_SMTP_HOST);


If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.