This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes SMTP Mail Configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "SMTP Mail Configuration" Watch "SMTP Mail Configuration" New topic

SMTP Mail Configuration

Maria Laxmi
Ranch Hand

Joined: Aug 08, 2008
Posts: 40

I am usign Liferay6 and I have my custom portlet which sends an email. I am using JavaMailSender to send an email. I want to configure mailSender properties like smtp host, smtp port from Liferay's mail configuration. In liferay6 you can configure the SMTP server by going to Control Panel -> Server Administration -> Mail. I want to read these properties for my custom portlet and configure mailSender in my portlet. I tried configuring as mentioned below but didn't work.


I always get default values for below mentioned property even if I change it to something else through Liferay's control panel. My question is how can I get the values of outgoing smtp host & port which is configured through Liferay's mail configuration. = localhost
mail.session.mail.smtp.port 25

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

if you put those values in the then you'll be able to read your updated values.
You do have a file, don't you?
It is sorta covered in the JavaRanch Style Guide.
subject: SMTP Mail Configuration
Similar Threads
how to send email using Java Program?
Sending email from java. Pls Help!!!
Unable to get the list of folders in hotmail using JavaMail
Confusion over SSL and TLS for sending mail thorugh JAVA Mail API
Mail sending program