• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jForum2mailingList like functionality

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to get jforum2mailingList like functionality?

What I want is, whenever a new post is created, a mail to be sent out to the mailing list with subject as the topic name and body as the complete post. The other way need not work (ie sending a mail to the mailing address need not create the forum post entry).

Is there any config/tool which can do this? Else can someone point me to a good point in the jforum code where a new post object is persisted and I can hack in my code at that point?
[originally posted on jforum.net by shane]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jForum supports "watching" a forum for new topics and a topic for new replies. There are a bunch of user elected options that can be set in profile screen and/or in the forum. One option is to include the full text of any new message.

This may be what you are looking for. If not, you can look at the classes in the net.jforum.util.mail package. In particular, the ForumNewTopicSpammer and TopicReplySpammer classes.

In addition, these work with template files in the templates/mail directory. You can modify the text of the email that gets sent in these files the same way you can the display templates.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the pointers monroe. Here is what I am thinking:

1. Add a property ConfigKeys.MAIL_USERIDS_TO_NOTIFY_ON_ALL_POSTS which will be a comma separated list of email ids to notify
2. Add the following in the begining of the methods TopicsCommon.notifyUsers() and ForumCommon.notifyUsers()



Some notes:
a. I am planning on editing TopicsCommon and ForumCommon instead of ForumNewTopicSpammer and ForumNewTopicSpammer as I need to get the calls even if no one is watching any topic or forum
b. I am planning to use TopicReplySpammer for both new topic and reply post case, so that the subject is the same and gmail can thread the messages properly
c. for implementing toUserObjects, I plan to use:



Would appreciate it if you can let me know if I am going in the right direction.
[originally posted on jforum.net by shane]
 
reply
    Bookmark Topic Watch Topic
  • New Topic