View Single Post
  #1062  
Old 07.02.2020, 08:44
leotzian leotzian is offline
Baby Loader
 
Join Date: Jun 2018
Posts: 6
Default

Hi my friend again I am trying to make this work, first question in the below script

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

if (link.isFinished()) {
var absender = "nas@domain.de";
var empfaenger = "empfaenger@domain.de";
var inhalt = getPath(JD_HOME + "/link - inhalt.txt");

writeFile(inhalt, "Link Finished: " + link.getName(), true);
callSync("sendmail", "-F", absender, "-t", empfaenger, "<", inhalt);
deleteFile(inhalt, false);
}

I change only the text inside the quotes with my sender email in
var absender = "nas@domain.de";
and the reciever email in
var empfaenger = "empfaenger@domain.de";

nothing else? I managed to install event scripter in JD in my nas and activate it and activate and the script, but it is not working.
I tried to ssh to the nas the sentmail command but I have the response
sentmail: command not found, so I must search the net what else to do in my nas to activate sentmail ..... it seems difficult to me, I don't want to bother you any more...
Thank you very much for the help I don't know if anyone in this forum that had managed to make this work to help a little.

Edit

I had made an improvement I managed to get sentmail command to work, I had to install mailserver package in synology and configuring it.
Now when download is finished I recieve an email in my spam folder without subject and without body
But if I run a script within my synology task manager with the following format email has title body subject and it goes in my inbox perfect, the format is the below

sendmail -F "Synology Station" -f "sender@here.com" -t reciever@herere.com << EOF
Subject: Synology Mail Test
All working fine.
EOF


Is it easy for you to convert the above jdownloader script to this format I had not know how...

Thanks in advance.

Last edited by leotzian; 07.02.2020 at 09:59.
Reply With Quote