Saturday, 30 March 2013

Configure Mail Server In Liferay : Simplest Way

Intended users for this post are developers. As we have to work on restricted environment, where we cannot configure complete mail server and test mails,we need a simplest way to test mailing applications.

Recently I need to test forgot functionality in liferay 6.1.1 for which we need a mail server. Google's smtp free server (smtp.gmail.com: 465) is not allowed in our environment. So I have configured my own smtp server on local machine and tested the functionality. It is really simplest way to test your application.

Step 1: First configure your own mail server on your machine.
Step 2: Login to liferay as admin user, go to control panel\Server Administration\Mail and enter following details(There are default details, any way).
  • Incoming POP Server: localhost
  • Incoming Port: 110
  • User Name: root
  • Password: root
  • Outgoing SMTP Server: localhost
  • Outgoing Port: 25
  • User Name: root
  • Password: root 
and save them. 
Step 3: Click on forgot password, enter captcha, password hint and send-email-link. 
Step 4: Verify your mail here where you can see password update link.
JAMES_HOME\apps\james\var\mail\outgoing\XXXXXXXXXXXXXXXXXX.Repository.FileStreamStore 


Note: If you are using liferay 6.1.1 GA2 and default configuration of apache-james-2-3-2 then link pattern will be some thing like this,
http://localhost:8080/c/portal/update_password?p_l_id=10591&ticketKey=b594ea37-718a-44d0-b46d-f6f9cefe3c09
Remove amp;from the above link, other wise forgot password link will redirect user to home page. It will not ask user for new password.

1 comment:

  1. brillant piece of information, I had come to know about your web-page from my friend hardkik, chennai,i have read atleast 9 posts of yours by now, and let me tell you, your webpage gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanx a million once again, Regards, liferay training in hyderabad

    ReplyDelete