Mailing list feature on Message Boards portlet

    I just finished a new feature for the Message Boards portlet. The new feature consist of a mechanism to link a Message Boards category to an existent mailing list service. Enabling the users to send messages from the Message Boards and reading it using a mailing list and vice-versa. Easy right?

    How this new feature will work? Simple, when you create a new or edit an existent Category you can configured an email address of the mailing list, like users@sliferay.com (fictitious), and the information of an incoming email account. Take a look on the screenshot.

    So, the email address field is the mailing list address, it is the address used to reach the mailing list, it represent the TO field on a email message. The fields on the Incoming tab represent an email account. It is used to read the messages received by the mailing list, you can use POP or IMAP protocol and a connection over SSL or not.

    The other tab represent the outgoing email account used to send the messages posted on the Message Boards to the mailing list. This tab actually represent the SMTP server used to send messages. You can use the default SMTP server used to send all the email messages in the portal or you can configured a custom SMTP server to be used only to send the messages from the category being edited.

    If you choose the default SMTP server you need only set the email address used to fill the FROM field of an email message.

Otherwise you must provide the fields on the form.

    Once you have everything configured you can start to send messages throught the Message Board and receive on the mailing list and vice-versa. 

    Also you can active and deactive the feature using the properly checkbox.  Right now the feature is only available on trunk. The release 5.2 of Liferay will bundle it.

    Enjoy and let me know if you have suggestions or questions about it.

Blogs
Hello,


I suggest that MessageListener also use field "Message-id" in mail's header to determine the parent thread.
I think that is necessary save "Message-id" of all messages as property of Message object.
Then when message input with "referral" or "in-reply-to" is necessary check this with prior saved "Message-id"

Thanks
Hi Miquel,

No worries! Since the start of the development we care how the mail messages would be imported. It's done already!

Thanks!
Hello Thiago,

First, many thanks for your reply and nice work.
I don't understand your reply. It's in your TODO's list ?

Checking the source code I see that Liferay search MessageId in the header "References" and "In-Reply-To" , this is good for Liferay but not for generic maillist.

I recomend to use property "Message-id" in the header of the mail messages to determine the message parent.
Hi Miquel,

The implementation was done since the beginning! We used the message-Id, references and in-reply-to headers to mark and identify the messages going back and forth from the mailing list. It's generic enough for message board and for a mailing list service. On the tests it worked perfectly. Try and let me know if something goes wrong!
Hi Thiago,

My problem is when tries to import maillist created outside of liferay.
You are using MBUtil.getParentMessageId(mailMessage) to get parentId.
When I analize this function, I don't see where uses "Message-Id" header.
I think that only works well if maillist was created inside liferay.
Hi miquel,

You are right! When you try to import a mialing list the MB portlet won't find the correct parent message. I opened a issue on Jira to take care of this. http://support.liferay.com/browse/LEP-7418

Thanks
This is a realy cool feature!!!

But I have two issues:

1. The outgoing Email has an empty "Reply to: <>" tag. Some Email clients show a invalid sender email address and you can't reply via Email. I solved the problem by rewriting the tag using postfix regular expressions (a very bad hack).

2. Incoming mails are attached to the right thread, but people how have a subscription to the message board are not notified about the new "message post" via email. You can only see the new post in the web-message board.

Has anybody similar problems?
Hi!
Can anyone say me if this functionallity is related to this one described in http://www.liferay.com/community/wiki/-/wiki/Main/Mailing%20Functionality%20in%20Liferay%20Message%20Boards?

Thanks in advance
Hey Mónica,

It is not the same functionality, but it is related. The functionality here described rely on a mailing list service, like Mailman.
Hi,
I am try to mailing list feature. When i get a email notification, i tried replying to it from blackberry. This reply is not posted to liferay thread. When i debug i found that, In-Reply-To and Reference headers are missing when i reply from blackberry. When i do the same fromoutlook it is working perfectly. Any idea why this is happening?

Thanks
Hey Jacob,

This seems to be a restriction of your Blackberry software. It is not sending these header values in the mail message.
Be advised that Liferay makes an assumption regarding the e-mail account specified in the incoming tab (when using IMAP). The code assumes that the INBOX is returned as the first folder. If the mail server is Microsoft Exchange, the INBOX is actually the fifth folder(!). Modifying the getFolder() method in MailingListMessageListener (in ext-impl/src/com/liferay/portlet/messageboards/messaging) was the only way to make this feature work with Exchange's IMAP.