View Single Post
  #1067  
Old 08.02.2020, 11:45
leotzian leotzian is offline
Baby Loader
 
Join Date: Jun 2018
Posts: 6
Default

Quote:
Originally Posted by mgpai View Post
I had created those scripts based on the information provide in this link:
Code:
mkleine.de/blog/2016/01/07/synology-sendmail-per-shell-aktivieren/

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

if (link.isFinished()) {
    var sender = "sender@here.com";
    var receiver = "reciever@herere.com";
    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.
Hi my friend thanks for help
I tested your script it is not working, I don't want what is going on, I tried with other email adress
Download is finished at once an email is sent from the sender's email, to the recievers inbox BUT ir had not Title subject or Body only From to .
In my nas had installed from community repo the only version they have look the photo attachment, also If I olen from the nas the file created by the script
org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json
usinf text edidor the format is not the same as the original script is this normal?

[ {
"eventTrigger" : "ON_DOWNLOAD_CONTROLLER_STOPPED",
"enabled" : true,
"name" : "Event Script",
"script" : "// Send email notification (NAS)\n// Trigger Required: A Download Stopped\n// Important: Enable "Synchronous execcution" checkbox in top panel\n\nif (link.isFinished()) {\n var sender = "sender@gmail.com";\n var receiver = "reciever@otenet.gr";\n var message = getPath(JD_HOME + "/download finished notification.txt");\n\n writeFile(message, "Link Finished: " + link.getName(), true);\n callSync("sendmail", "-F", sender, "-t", receiver, "<", message);\n deleteFile(message, false);\n}\n",
"eventTriggerSettings" : { },
"id" : 1581153863487
} ]

Perhaps a bug in the NAS version of JDownloader?
Attached Thumbnails
Jdownloader.jpg  
Reply With Quote