Add destination to backup email notification subject

Hey Jamie,

In this thread, it'd been requested to add the destination to the notification email for backups: https://virtualmin.com/node/34980

Seems reasonable. I've included a patch to implement it. I haven't tested it, though it looks simple enough that even I probably wouldn't screw it up.

If you don't have any objections to adding this behavior as the default,and doing it in the way I've done it, and don't want to mess with it, I can test it and commit it to git. (I guess it's theoretically possible people could have scripts out there that rely on the exact text coming back from the emailed report...but, that seems unlikely, since it's much more likely they'd be using the command ine API if they're using scripts for stuff like this.)

Status: 
Active

Comments

That looks fine to me, assuming that $dest is the destination in a human-readable format.

Actually, before that block you might want to add the line :

$dest = &nice_backup_url($strfdests[0]);

to ensure that it is formatted nicely.

Joe's picture
Submitted by Joe on Mon, 10/27/2014 - 02:54 Pro Licensee

That function wraps it in HTML tt tags, which don't get rendered in most email clients in the subject, which is kinda bug-like, I think. It is otherwise nice, though, and itthe patch with your suggestion works, so I've committed the change.