Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
13 views
ago in CompleteFTP by (120 points)

For Process Trigger 2, is there a way to add a 'from' email address? What about a subject line?

var uploads = system.user.tags.get("uploads");
if (uploads) {
    uploads = JSON.parse(uploads);
    
    var message = "The following files were uploaded:\r\n";
    for (var i in uploads)
        message += "- " + uploads[i] + "\r\n";

    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;

    mail.send("sender@test.com", "recipient@test.com", "Files uploaded", message);
}

1 Answer

0 votes
ago by (164k points)

Your sample code shows the from email address (sender@test.com) and the subject (Files uploaded).

For more details see JSS API guide in our User Guide, here

Categories

...