E-mail notification for Discussion Feature

cancel
Showing results for 
Search instead for 
Did you mean: 
akash251998
Established Member II

E-mail notification for Discussion Feature

Hi all,

I am using alfresco community version 5.2. I am using the Discussions feature provided by alfresco. I have set e-mail settings using the configuration in global properties:

##SMTP Configuration##

mail.host=smtp.gmail.com
mail.port=465
mail.username=rRajandaddu@gmail.com
mail.password=iamhuman@2367
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true
mail.from.default=rRajandaddu@gmail.com
mail.from.enabled=false
mail.encoding=UTF-8

mail.testmessage.send=true
mail.testmessage.to=rRajandaddu@gmail.com
mail.testmessage.subject=Inbound SMTP
mail.testmessage.text=Successfully implemented in Rajandaddu DMS.

But email is not notifying.

I am using the Discussions feature so i want mail notification should be send as any new topic is initiated to all involved in that discussion . And while replying to any others the reply should be notified in the mail whom anyone have replied.

As well as there is no option of attaching any documents with the topic .How to achieve this .

Regards

Akash D

4 Replies
abhinavmishra14
Advanced

Re: E-mail notification for Discussion Feature

@akash251998 

Gmail does't allow to use smpt feature by default now and considers it as unsecure practice for the gmail account. However, if you are trying to use the gmail smtp, you need to enable it from your account's security settings.

In order to send email via gmail follow the steps below:

If you have already done these steps, check the server log and see if you can locate any errors. 

You can also setup local smtp server (using Apache James/Hedwid/Fakesmtp etc.) if you are doing email functionality testing, refer the post below:

https://javaworld-abhinav.blogspot.com/2019/04/setting-up-local-mail-server-using.html

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
akash251998
Established Member II

Re: E-mail notification for Discussion Feature

Thanks for the response. 

 

But I have already done the gmail setting change.  My objective is that I am using discussion feature and I want that when someone  replies to someone's topic then they get notified by mail .So how to achieve that one .

Like A starts a discussion topic and tag B C and D . Now if B replies to A then A should get notified by a mail that B have commented like this . Is there any possible way to do it..

abhinavmishra14
Advanced

Re: E-mail notification for Discussion Feature

ok i thought you have implemented email notifications already and have problems with sending/receiving emails. 

Alfresco Discussions feature doesn't have notification functionality by default as far as i know. You have to implement the functionality youself. 

Quick hint:

As you know anything you create in alfresco is created as a node. This discussion functionality also has a model called forumModel

All Topics have a type (fm: topic) and all posts/replies (fm: post) also have a type under the hood. All fm: post are created as association to fm: topic using cm: contains child-association. 

You can create a behavior which can listen to OnCreateNode OnUpdateNode / OnCreateChildAssociation / OnContentUpdate events depending on your use case and get the modifier of node (userName) and use PersonService to find the email id of the user and notify using MailActionExecuter  or create your custom email utility whichever suits your needs.

Also have a look at this add-on and see if it is useful: https://github.com/malariagen/alfresco-discussions

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
idwright
Senior Member

Re: E-mail notification for Discussion Feature

The alfresco discussions addon doesn't work properly as of 5.2 (ref https://hub.alfresco.com/t5/alfresco-content-services-forum/rules-not-working-after-upgrade/m-p/2941...), which also means the simple way of implementing this functionality won't work either.

As discussions are deprecated anyway I've no plans to fix it - we've moved our discussions to discourse instead - wasn't that hard to write a migration script

(I haven't tried it on later versions)

Inconvenient and a nail in the coffin of our Alfresco implementation but there you go...