Sending mail in liferay
In most of your project you may come across sending an mail to the user when ever updated. In liferay its pretty easy to do with that InternetAddress fromAddress = new InternetAddress(user.getEmailAddress()) // from address InternetAddress toAddress = new InternetAddress(user.getEmailAddress()) // to address String body = ContentUtil.get("/templates/sample.tmpl", true); // email body , here we are getting email structure creating the content folder in the src and create the file with the extension as tmpl . Here i have created a folder called content and also created file as sample.tmpl String subject = "subject" // email subject body = StringUtil.replace(b...