How to send email notifications after file downloads
A plain WordPress file link does not provide a reliable after-download email trigger. Use Download Monitor to record the download, then either connect its download action to wp_mail() or install an email notification extension for selectable files, recipients and notification fields.
- 01Choose who receives alerts
- 02Route files through Download Monitor
- 03Use the manual code route
- 04Make WordPress mail deliverable
- 05Install the faster notification route
- 06Run a real download test
What you need
- A WordPress site with Download Monitor installed and active
- Administrator access to WordPress
- An email address on your site domain
- SMTP or another working WordPress mail delivery service
Choose who receives alerts
Decide whether the email should go to your team, the person downloading the file, or both. A visitor downloading a public media URL usually has not identified themselves, so WordPress cannot know where to send a personal confirmation.
If you need the downloader's address, collect it before access is granted with an email lock, form, membership login or checkout. Download Monitor's Email Lock extension can collect an address and send a download link after submission, with options such as double opt-in and a name field.
Route files through Download Monitor
Add the files as Download Monitor downloads and place their generated download links or shortcodes on your pages. This gives the plugin a download event to record. A direct link copied from the Media Library or a storage provider can bypass Download Monitor, so it will not reliably trigger the notification.
Check access rules, file paths and permissions before configuring email. If a file is stored outside the locations Download Monitor permits, add the approved path in its settings first.
Use the manual code route
For a developer-built setup, attach a callback to Download Monitor's dlm_downloading action. The action passes the download and version, and Download Monitor documents it as firing when a file is downloaded. The callback can then call WordPress's wp_mail() function with a fixed team address or an email address collected earlier.
This route is fine for one simple internal alert, but it is not a complete customer-email system. You must write the callback, decide how to identify the recipient, prevent unwanted duplicate messages, maintain the code in a child theme or site-specific plugin, and handle mail delivery failures yourself.
Make WordPress mail deliverable
Configure SMTP or your host's approved mail service before judging the notification feature. Use a real sender address on the site's domain, and send a test message to an address you can inspect.
A true result from wp_mail() only means WordPress handed the message to the mail system; it does not prove that the recipient received it. If messages disappear, check the SMTP settings, sender authentication, spam folder and the server's mail logs.
Install the faster notification route
For most site owners, install and activate Download Monitor Email Notification, then open Downloads > Settings > Emails. Choose whether to notify for all downloads or only selected downloads, enter one or more recipient addresses separated by commas, and select the fields to include in each alert.
For selected files, save the settings and edit each relevant download. Enable Email Notification in its Download Options, then save the download. This is the fast way when download confirmations and activity alerts matter more than maintaining custom code.
Run a real download test
Open the download page in a private browser window and complete the download as a visitor would. Confirm that the file arrives, the notification identifies the correct file and version, and the recipient and selected fields are correct.
If no message arrives, first check that the link is a Download Monitor link, the selected-download setting is enabled for that file, and the mail system works independently. Also remember that Download Monitor can prevent the same download being counted repeatedly within a short window, so several clicks in quick succession may not create several alerts.
Let Download Monitor Email Notification do it
Automatic, customizable emails after successful downloads; choose it when download confirmations and activity alerts are the priority.
Sources
- download-monitor.com /kb/email-lock/?utm_source=openai
- download-monitor.com /kb/add-path/?utm_source=openai
- download-monitor.com /kb/action-and-filter-reference/?utm_source=openai
- developer.wordpress.org /reference/functions/wp_mail/?utm_source=openai
- download-monitor.com /kb/email-notification/?utm_source=openai
Questions
- Can WordPress email someone after any file download?
- No, WordPress does not provide a general built-in email event for every public file URL. You need a download manager or custom code that detects the event, such as Download Monitor's documented <code>dlm_downloading</code> action, and then sends the message through <code>wp_mail()</code>. A direct Media Library link will not reveal the downloader's email address.
- Can I email the person who downloaded the file?
- Yes, but only if you know the person's email address. Require an email before access with an email lock, form, login or checkout, then send the confirmation to the submitted or account address. For anonymous public downloads, send the alert to an internal address instead, because the download request contains no reliable recipient identity.
- Why do download notification emails fail to arrive?
- The usual causes are an incorrect recipient address, a disabled notification setting, a link that bypasses Download Monitor, or mail delivery problems. WordPress's <code>wp_mail()</code> returning true does not confirm inbox delivery, so check SMTP configuration, sender authentication, spam filtering and server mail logs.
- Can I notify only for certain downloads?
- Yes. Download Monitor Email Notification lets you choose selected downloads instead of all downloads. After saving that setting, edit each required download and enable Email Notification in its Download Options. This avoids an alert for every file while still tracking important documents, lead magnets or product manuals.