Media/Document Notifier
This module sends email notifications when files with specific extensions are uploaded to your Drupal site. You can configure which file types trigger an email, who receives the notifications, and what the email subject and message say, including placeholders for the file URL and the uploader's username.
Introduction
Media/Document Notifier sends email notifications when files with configured extensions are uploaded to a Drupal site. The module supports Drupal 10 and Drupal 11.
Features
- Configure allowed file extensions such as
pdfanddocx. - Configure one or more notification recipients.
- Customize the notification subject and plain-text message.
- Use
[file_url]and[current-username]placeholders in the message body. - Restrict configuration access with the
administer media document notifierpermission.
Installation
composer require 'drupal/medianotify:^1.0' drush en custom_email_notify
Configuration
- Grant
administer media document notifieronly to trusted administrator roles. - Go to Configuration > System > Email Notify Settings.
- Enter allowed file extensions without dots.
- Enter comma-separated recipient email addresses.
- Save the notification subject and message.
Security and maintenance
The module validates configured file extensions and recipient email addresses. Email subjects cannot contain line breaks. Configuration access is protected by a dedicated restricted permission. The project includes Drupal GitLab CI configuration and is maintained for Drupal 10 and Drupal 11.
License
This project is licensed under GPL-2.0-or-later.