5 min read

Working with Mail Portlet

For the purpose of this article, we will use an intranet website called book.com  which is created  for a fictions company named “Palm Tree Publications”.

In order to let employees manage their emails, we can use the Liferay Mail portlet. As an administrator of “Palm Tree Publications”, you need to create a Page called “Mail” under the Page, “Community” at the Book Lovers Community Public Pages and also add the Mail portlet in the Page, “Mail“.

Experiencing Mail Management

First of all, login as “Palm Tree“. Then, let’s do the above as follows:

  1. Add a Page called “Mail” under the Page Community” at the Book Lovers Community Public Pages, if the Page is not already present.
  2. If the Mail portlet is not already present, add it in the Page, “Mail” of the Book Lovers Community where you want to manage mails. You will see the Mail portlet as shown in the following figure.

Liferay Portal Enterprise Intranets

Let’s assume that we set up the mail domain as “cignex.com” in the Enterprise Admin portlet for testing purposes, as we have a mail engine with this mail domain already. Of course, you could set up the mail domain as “book.com“, or something else, if you had a mail engine with this mail domain in your hand.

As an editor of the editorial department, “Lotti Stein“, you may want to manage your mails in the mail domain, “cignex.com“. You can first choose a user name for your personal company the email address, say “admin1234” and register. Let’s do it as follows:

  1. Login as “Lotti Stein“.
  2. Go to the PageMail” under the Page, “Community“, at the Book Lovers community Public Pages.
  3. Locate the Mail portlet.
  4. Input the value for User name as “admin1234“.
  5. Click the Register button.

Your new email address is “[email protected]. This email address will also serve as your login, as shown in the following figure.

Liferay Portal Enterprise Intranets

You can now check for new messages in your inbox, by clicking the Inbox link first. Then, you can view the Unread messages, and either Check Mail or create a New mail, as shown in the following figure:

Liferay Portal Enterprise Intranets

You can go to the Page of Mail management by clicking on any link of Unread Messages, or Check Mail button or New button. Further, you can manage emails through the Mail portlet of your current account. Email management includes the following features (as shown in the following figure):

  • Create a New email.
  • Check Mail.
  • Reply to an email.
  • Reply All emails.
  • Forward emails.
  • Delete emails.
  • Print emails, and
  • Search.

Liferay Portal Enterprise Intranets

Note that the first email with the subject, “Users in Staging server“, is sent through the SMS Text Messenger portlet. For more details, refer to the forthcoming section.

How to Set up Mail Server?

In order to make the Mail portlet work, we have to set up a mail server with IMAP, POP and SMTP protocols. Suppose that the Enterprise “Palm Tree Publications” has a mail server with the domain “exg3.exghost.com“, an account “[email protected]/admin1234“, and protocol IMAP, POP and SMTP. As an administrator, you need to integrate this mail server with IMAP, POP and SMTP protocol in Liferay. Let’s do it as follows:

  1. Find the file ROOT.xml in $TOMCAT_DIR/conf/Catalina/localhost.
  2. Find the mail configuration first.
  3. Then configure it as follows:
      <!-- Mail -->
      <Resource
      name="mail/MailSession"
      auth="Container"
      type="javax.mail.Session"
      mail.imap.host="exg3.exghost.com"
      mail.imap.port="143"
      mail.pop.host="exg3.exghost.com"
      mail.pop.port="110"
      mail.store.protocol="imap"
      mail.transport.protocol="smtp"
      mail.smtp.host="exg3.exghost.com"
      mail.smtp.port="2525"
      mail.smtp.auth="true"
      mail.smtp.starttls.enable="true"
      mail.smtp.user="[email protected]"
      password="admin1234"
      mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
      />

In short, a Mail portlet is an AJAX web-mail client. We can configure it to work with any mail server. It reduces page refreshes, since it displays message previews and message lists in a dual pane window.

How to Set up Mail Portlet?

If you have proper Permissions, you can change the preferences of the Mail portlet. To change the preferences, you can simply click the Preferences icon to the upper right of the Mail portlet.

With the Recipients tab selected, you can find potential recipients from the Directory (Enabled or Disabled) and the Organization (My Organization or All Available). Click the Save button after making any changes.

Using the Filters tab, you can set the values to filter emails associated with an email address to a Folder. Click the Save button after making any changes.

Note that the maximum number of email addresses is ten. This number is also configurable at the portal-ext.properties

Similarly, the Forward Address tab allows all emails to be forwarded to the email address you want. Enter one email address Per Line. Remove all entries to disable email forwarding. Select Yes to leave, or No to not leave a copy of the forwarded message. Click the Save button after making any changes.

Further, the Signature tab also allows you to set up your signature using HTML text editor. The signature you have set up will be added to each outgoing message. Click the Save button after making any changes.

The Vacation Message tab allows you to set up vacation messages using HTML text editor. The vacation message notifies others of your absence (as shown in the following figure). Click the Save button after making any changes.

Liferay Portal Enterprise Intranets

LEAVE A REPLY

Please enter your comment!
Please enter your name here