Skip to content

PutmanMedia/silverstripe-comments-notifications

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page comments email notification module for Silverstripe

This mobule provides simple email notifications for page comments

Credits and Authors

License

  • TODO

Requirements

Installation Instructions

  • Extract all files into the 'comments-notifications' folder under your Silverstripe root.

Configuration

Using the Config set the "recipient" attribute of "CommentsNotifications" class to one of:

  • SiteConfig (configure the email under settings globally)
  • Page (configure the recipient per page)
  • Admin (uses the admin email address)
  • Disabled
  • any email address (use this explicit email address)

E.g. MyProject.yaml

CommentsNotifications:
  recipient: 'Page'

Extending

To hook into the outgoing email (in order to customise the template) you can extend CommentingController with an extending class with a function updateEmail

class EmailSenderExtension extends Extension {
	public function updateEmail(Email &$email) {
		$email->populateTemplate(array(
			'SiteConfig' => SiteConfig::current_site_config()
		));
	}
}

Need more help?

Message or email me at [email protected] or, well, read the code!

About

Simple email notifications for comments posted against the Comments module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 84.6%
  • Scheme 15.4%