View Single Post
  #1077  
Old 16.02.2020, 15:41
leotzian leotzian is offline
Baby Loader
 
Join Date: Jun 2018
Posts: 6
Default JD2 and Synology NAS email Sent after Download Finished

Hi to all I open a new thread if anyone has found a solution to this I had searched a lot but I could not find a person who had managed to solve this issue.

I had tried with @mgpai hours in the chat to solve the task I want, I don't know If you have any idea of that.
I want when JD finished a download to sent me an email.
I had installed mail server in the nas that installs postfix sendmail command.
I had managed to get email sent with commands using sunology CLI but the same commands using script manager are not working.
The command that it is working is
sendmail -vt < /mail.txt in mail.txt I have the format
===================
To: reciever@otenet.gr
Subject: JDownloader Downloads
From: sender@gmail.com

Body of the message
====================
This command sents an email with sender reciever in recievers mailbox, with subject and body.

With @mgpai he managed to create the txt file filled with the correct data of the downloaded file ( subject and file details ).
When I run this command using CLI of synology ssh it is working fine
If I make a script with this command in Task scheduler of my nas it is working ok, BUT if I try to add THE SAME COMMAND using script in event scripter, WE had tried 1000 compinations with /r/n etc or different syntax , it is not working, The command cannot access the mail.txt file and the "<" symbol is not recognised.
I had tried to store the mail.txt in several locations with the same result.
I don't if it permision issue.
I had installed JD through the synology community repo through the package manager in my NAS
Do you have any ideas where to look for or what to do?
Another format that is working using CLI is

sendmail -F "Synology DS416Play" -f "sender@gmail.com" -t "reciever@otenet.gr"
Subject: JDownloader Downloads
Download had been finished
EOF

In the CLI I have to press enter after each line but in the script /r/n/ commands are not recognized as line feed or carriage return, by my nas and in the mail server log it seams that I have emails to recievers like - Subject ,Jdownloader,Downloads EOF etc
Very crazy though

If anyone who owns a Synology NAS had managed to make this work please a little help please.

Thanks in advance and sorry for the big post.
Reply With Quote