Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to send email notification to buddypress users when a new post is posted in the activity stream

  • Is there a way to email all Buddypress members when a post occurs in the activity stream? Right now if someone makes a post, there is no way for other users to be notified unless they visit the activity stream.

    I couldn’t find any plugins that send out notifications to all users whenever a new activity post is created. I have seen plugins for group email subscriptions, but I do not use groups with BuddyPress.

    There seem to be others who have asked the same question on this forum, but an answer has yet to be posted.

    Any help would be appreciated.

    Thanks,
    Edgar

Viewing 5 replies - 1 through 5 (of 5 total)
  • Bump


    Roger Coathup
    Participant

    @rogercoathup

    Do you mean, you want to send an email to everyone when a new (blog) post is posted, or when any kind of item is posted to the activity stream?

    For the first you can hook a function on to the WordPress ‘save_post’ action. In that function, you can iterate over every member (see https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/ for guidance), and for each member you use the BP messaging API ( messages_send_message() ) to send them an email.

    For the second – you can’t seriously want to email everyone, any time anything is posted to the activity stream: the system and your users would be swamped – However, if you still do, check out some of the action hooks that are called when activity items are saved: https://codex.buddypress.org/developer-docs/action-reference/activity-streams/

    Roger,

    Thanks for the update. And yes, I want to to do the second option. My website does not have much activity. The activity stream is used almost like a forum where people post questions or leave comments. However, when someone posts a question, none of the members ever know. So the questions go unanswered. I will look into the action hooks that you mentioned. Are there any tutorials on how to use action hooks?

    Thanks again for pointing me in the right direction.

    Ed


    Roger Coathup
    Participant

    @rogercoathup

    Actions are a standard part of WordPress programming – if you check the WordPress.org documentation, or any good book on advanced WordPress PHP development, you should be able to find good guidance.

    What if instead of sending an email I just want a “New Comments Available” logo to show up next to the link that I have to the activity stream? Currently I have a page where I have various links to other pages. It looks something like this:

    -Calendar of Events
    -Group Wall “NEW COMMENTS AVAILABLE”
    -Documents

    So the link that says Group Wall is really directing the user to the activity stream. So anytime there is new activity available you would get that message. How easy would this be to implement?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to send email notification to buddypress users when a new post is posted in the activity stream’ is closed to new replies.
Skip to toolbar