Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
335 views
in CompleteFTP by (51.6k points)
A user asked us if the user who shared a file can be notified by email when it's downloaded.

1 Answer

0 votes
by (51.6k points)
 
Best answer

You can do this using a JSS process trigger. Please add a process trigger with the following settings:

Events: Download file
Type: JSS script
Script:

var isShareDownload = event.virtualPath.indexOf("/Share/")==0;
if (isShareDownload && event.ownerEmail) {
    mail.smtp.server = "smtp.gmail.com";
    mail.smtp.port = 587;
    mail.smtp.userName = "my.account@gmail.com";
    mail.smtp.password = "my.password";
    mail.smtp.enableSSL = true;
    
    var message = event.windowsFileName + " was downloaded";

    mail.send("sender@test.com", event.ownerEmail, "Shared file downloaded", message);
}

Leave the rest of the settings as is. Make sure you set the SMTP server details as appropriate and replace sender@test.com with your sending email address. You must also set the email address property of each user to whom you'd like notifications sent.

Categories

...