hypejunction / hypenotifications
Enhanced on-site and off-site notifications
Installs: 285
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Type:elgg-plugin
Requires
- php: >=5.5
- composer/installers: ~1.0
- guzzlehttp/guzzle: ^6.3
- mailgun/mailgun-php: ^2.4
- pelago/emogrifier: ~1.0
- php-http/guzzle6-adapter: ^1.1
- sendgrid/sendgrid: ^6.0
- sparkpost/sparkpost: ^2.1
- zendframework/zend-mail: ~2.4
- zendframework/zend-servicemanager: ~2.4
README
Features
- Facebook-style site notifications
- Email digest: users can specify at which interval they receive notifications for each type
- A tool to update preferred notification methods for all site users
- Leverages
Zend_Mail
(email library used in core) to send out HTML emails - Allows to configure email transports (Sendmail, SMTP, File Transport, SendGrid, Mailgun, SparkPost)
- Allows to send file attachments
- Inlines CSS styles for improved email client experience
- Simpler testing experience: catch all email address, email/domain whitelist
Usage
Notification preferences
Go to Admin > Administer > Utilities > Notification Methods to update personal and subscription notification preferences globally.
Developer Notes
Notification event types
Notification event types can be filtered using 'notification_events','notifications'
hook.
Users will be given an option to unsubscribe from notifications about these events or batch them into a digest.
Note that some instant notification events should not be added this list, e.g. password reset and other
account related notifications should remain instant.
Notification Testing
You can disable outgoing email by switching to File Transport in plugin settings,
this will instead write email as txt files to the filestore under /notifications_log/zend/
Sample SMTP config for GMail
To use GMail as your SMTP relay, you will likely need to Allow less secure apps: https://support.google.com/accounts/answer/6010255?hl=en
- Host: smtp.gmail.com
- Port: 587
- Secure Connection: TLS
- Auth: SMTP with AUTH LOGIN
- Username:
- Password:
Sample SMTP config for SendGrid
- Host: smtp.sendgrid.com
- Port: 587
- Secure Connection: TLS
- Auth: SMTP with AUTH LOGIN
- Username: apikey
- Password:
File Attachments
To add attachments to your email, add an array of ElggFile
objects to notification parameters:
notify_user($to, $from, $subject, $body, array( 'attachments' => array( $file1, $file2, ) ));