JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > English Support > General Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old 16.11.2017, 13:24
torrero007
Guest
 
Posts: n/a
Default 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
Reply With Quote
  #2  
Old 16.11.2017, 15:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,561
Default

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
Reply With Quote
  #3  
Old 16.11.2017, 20:35
torrero007
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #4  
Old 16.11.2017, 21:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,561
Default

instead of package , try package.getName()
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 17.11.2017, 09:49
torrero007
Guest
 
Posts: n/a
Default

Great! Thank you Jiaz
Reply With Quote
  #6  
Old 17.11.2017, 09:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,561
Default

You're welcome
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:21.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.