My organization manages numerous websites and use UpdraftPlus for backups on all of them. We are trying to limit the number of unnecessary email alerts we are receiving from these sites from various plugins etc and many of these unnecessary alerts are coming from Updraft.
UpdraftPlus sends us an alert every time a warning is triggered, even when the backup is successful. When we tried to turn off these alerts we noticed that there is only one setting for alerts – you can either have them on for both warnings and failed backups or off for both. We do need to receive notifications when a backup fails so we are stuck receiving these alerts whenever there is a warning.
In our case they’re being triggered by large files such as video or other files that are in our sites’ media libraries. We receive a dozen alerts each day about backups that completed successfully but included a ‘large file’. Yes, we know that file is there.. you told us yesterday.. and unless it’s causing the backup to fail we’re not particularly concerned!
Please create separate settings for warnings & failed backup notifications.
Thanks!
Hi, this might help.
If you look in the file class-updraftplus.php around line 3,793, there is a function for sending email, it uses a filter “updraft_report_sendto”, this filter receives the count of errors and the count of warnings. If you hook this, you could probably check if there are zero errors but more than zero warnings, and don’t send the email. Something like this (making this up so you have to adjust and look for yourself)
add_filter(“updraft_report_sendto”, function($send, $to, $err, $warn, $ind) {
return !($err === 0 && $warn >= 0);
}, 99, 5);
If this works, I’m checking if the errors are 0, but has more than 0 warnings, to not send the email. If there are errors, or errors and warnings, or no errors and no warnings, the email will send. Adjust the logic as you see fit. You could even filter the “$to” variable and allow sending warning emails to some people and not others.
Hope that helps!