HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adding the message body to the email notification

rbowenrbowen New
edited October 2013 in General Banter

I'm trying to add the body of a new comment to the notification email that is sent to subscribers. I've seen this post, which basically says "no", with the explanation that it's intended to get people to go back to the forum - something I'm not terribly concerned about.

https://vanillaforums.com/discussion/866/body-of-the-post-in-the-notification-email

I've also tried tinkering with the entries in definitions.php:

$Definition['EmailNotification'] = '%1$s

Follow the link below to check it out:
%2$s

Have a great day!';
$Definition['EmailStoryNotification'] = '%1$s

%3$s

---
Follow the link below to check it out:
%2$s

Have a great day!';

However, I'm not sure what variable(s) to put in there which would contain the message body, because, as far as I can tell, it's not being passed in.

I've also tried to find a plugin that might provide this functionality.

I would really appreciate a nudge in the right direction. I expect that this is either really easy, or impossible, and I'd very much like to know which.

Thanks.

Comments

  • rbowenrbowen New
    edited October 2013

    redacted

  • hgtonighthgtonight ∞ · New Moderator

    You want to hook into the comment model. It sends over everything you would (presumably) need in the Before Notification event. Use the following in your plugin to get started:

    public function CommentModel_BeforeNotification_Handler($Sender) {
      decho($Sender->EventArguments);
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    peregrineUnderDog
  • Thanks. I'll start there and see what I can come up with.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!