View Single Post
Old 07.02.2020, 15:55
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 853

Originally Posted by leotzian View Post
I CAN sent emails via CLI, but I cannot make the script in Jdownloader to work, email IS sent but goes to spam it has no title, body and subject.
I had created those scripts based on the information provide in this link:

English version:
// Send email notification (NAS)
// Trigger Required: A Download Stopped
// Important: Enable "Synchronous execcution" checkbox in top panel

if (link.isFinished()) {
    var sender = "";
    var receiver = "";
    var message = getPath(JD_HOME + "/download finished notification.txt");

    writeFile(message, "Link Finished: " + link.getName(), true);
    callSync("sendmail", "-F", sender, "-t", receiver, "<", message);
    deleteFile(message, false);

In this case the message body is first written to a temp file and then passed to the call. I guess it might also be possible to include the subject in it.
Reply With Quote