hypejunction / notifications_html_handler
Notification Editor for Elgg
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Type:elgg-plugin
Requires
- php: >=5.5
- composer/installers: ~1.0
- hypejunction/forms_api: ~1.0
- pelago/emogrifier: ~1.0
- zendframework/zend-mail: ~2.4
- zendframework/zend-servicemanager: ~2.4
README
Features
- Leverages
Zend_Mail
(email library used in core) to send out HTML emails - Allows filtering/formatting instant notifications
- Allows to configure email transports (Sendmail, SMTP, File Transport)
- Allows to send file attachments
- Inlines CSS styles for improved email client experience
- Microdata support
Notes
-
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: xxxx@gmail.com Password: xxxx
Conflicts
This plugin will conflict with any other plugin that subscribes to "send","notification:email"
hook
Developer Notes
-
'format','notification'
hook can be used to format an instance of \Elgg\Notifications\Notification before it is passed on to the email transport. That also allows wrapping the message into an HTML shell. -
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, ) ));