#1
|
|||
|
|||
Script for sending email after package finished
Hi, trying to do something else, I came up with a way to send myself an email after a package is finished in JD. The trigger for the Event Scripter is "package finished". Here is the script:
Code:
//Add your script here. Feel free to use the available api properties and methods callAsync(function(exitCode, stdOut, errOut) {}, "C:\\sendEmail.exe", "-o", "tls=yes", "-t", "someone@gmail.com", "-u", "Download Completed", package, "-m", "Download completed;", package, "-f", "youremail@gmail.com", "-s", "smtp.gmail.com:587", "-xu", "yourusername", "-xp", "yourpassword"); Info "C:\\sendEmail.exe" : the path were the sendEmail is in your PC "-t", "someone@gmail.com" : the address which will notified "-f", "youremail@gmail.com" : the address which will send the notification "-xu", "yourusername" : your username on the "-f" account "-xp", "yourpassword" : your password on the "-f" account You will need a very simple program called "Sendemail". Download the version with TLS support. You will also need to enable POP and IMAP in the Gmail account you will use to send the notification from (the "f" attribute email address). In addition you need to turn on the "Access for less secure apps" on this account or else the Gmail with block the access to the acount. Hope it helps |
#2
|
||||
|
||||
Thank you very much for providing the script. You should post a reference to this in here https://board.jdownloader.org/showthread.php?t=70525
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
I will be very happy to. I would like to ask you something first.
Right now from the part [Download Completed", package,] I get something like [Download completed; FilePackage Instance: Vasilis Videos (Official Music Videos)] fro example. How can I avoid the "FilePackage Instance:" part? |
#4
|
||||
|
||||
instead of package , try package.getName()
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
Great! Thank you Jiaz
|
#6
|
||||
|
||||
You're welcome
__________________
JD-Dev & Server-Admin |
|
|