Can you control emails via scripting?
Can you control emails via scripting?
Got everything pretty much set up how I need with one exception. I need to send the job completion emails to different destinations depending on which of my user-defined categories the job was for.
Can I do this via scripting or any other means?
Thanks
Can I do this via scripting or any other means?
Thanks
Re: Can you control emails via scripting?
In 0.5 the email has been opened up to allow customisation, however I don't think the destination can be changed.
With it you could create an email filter from one central account that forwards the messages to other accounts however.
With it you could create an email filter from one central account that forwards the messages to other accounts however.
Re: Can you control emails via scripting?
Thanks for the reply.
The content of the email is fine, I just need to control where it goes.
Basically I'm using the categories as a kind of user system. I have a subfolder under the NZB folder for each category (or user) so when they drop their NZB files in there they'll be tagged as that category and the resulting downloads will go into a specific folder for each user.
This works fine except I need to send the email to a different address for each user which I don't seem to be able to do
The content of the email is fine, I just need to control where it goes.
Basically I'm using the categories as a kind of user system. I have a subfolder under the NZB folder for each category (or user) so when they drop their NZB files in there they'll be tagged as that category and the resulting downloads will go into a specific folder for each user.
This works fine except I need to send the email to a different address for each user which I don't seem to be able to do
Re: Can you control emails via scripting?
Ok but how would I do that exactly?
Re: Can you control emails via scripting?
You can most definitely do this by scripting/programming. I'm assuming you're not a programmer, or you wouldn't be asking the question. Using an email filter is not necessary in this case.Vertigo1 wrote: Got everything pretty much set up how I need with one exception. I need to send the job completion emails to different destinations depending on which of my user-defined categories the job was for.
Can I do this via scripting or any other means?
If you use a script, try to have it be a platform-independent script, such as using Python, etc.
Last edited by TeraLove on July 30th, 2009, 4:23 am, edited 1 time in total.
-
- Release Testers
- Posts: 180
- Joined: February 20th, 2008, 3:16 pm
Re: Can you control emails via scripting?
this is very easy to do in a post processing script. are you running unix or windows?
Re: Can you control emails via scripting?
I'm not the original poster, but why should this matter? IMO, it would be better if the script is platform-independent. There are too many scripts on this forum that work on Windows or Linux, but not both, and this makes them somewhat undesirable.doubledrat wrote: are you running unix or windows?
-
- Release Testers
- Posts: 180
- Joined: February 20th, 2008, 3:16 pm
Re: Can you control emails via scripting?
true. it's just I know batch or shell scripting better than I know python. I could give him an answer in 2 mins in those environments, also I can't see many people wanting to do this, so portability may not be an issue
Re: Can you control emails via scripting?
The nature of the data source mapping groups to emails is not defined. Part of the code is contingent upon it. In the simple case, I suppose one can assume it to be a CSV list.doubledrat wrote:I could give him an answer in 2 mins in those environments
-
- Release Testers
- Posts: 180
- Joined: February 20th, 2008, 3:16 pm
Re: Can you control emails via scripting?
it seems we're more interested in this than the original poster!
Re: Can you control emails via scripting?
I am also in need of such a script.
However my setup is a bit different.
I have a separate page for uploading NZBs that requires an e-mail address. The entered e-mail address is stored in a csv file. Is there anyway to look up and extract the email value from a CSV file?
However my setup is a bit different.
I have a separate page for uploading NZBs that requires an e-mail address. The entered e-mail address is stored in a csv file. Is there anyway to look up and extract the email value from a CSV file?
I'll take the bash script.this is very easy to do in a post processing script. are you running unix or windows?
Last edited by demioa on August 10th, 2009, 11:46 pm, edited 1 time in total.
Re: Can you control emails via scripting?
A separate page? Do you mean that there is a separate web based interface that you use, where users can upload an NZB file and enter their email address at the same time? What exactly is this interface?demioa wrote:I have a separate page for uploading NZBs that requires an e-mail address. The entered e-mail address is stored in a csv file. Is there anyway to look up and extract the email value from a CSV file?
How is the email stored into a CSV file? Do you permanently store all email addresses in the CSV file? What else is stored in the CSV file? Details help - lots of them. It is of course possible to extract data from a CSV file. Perhaps you could attach a sample of the CSV file.
Re: Can you control emails via scripting?
Well, the page is the web interface for my FTP. It is a private FTP I have for some friends over seas. If they upload an nzb file the ftp launches sabnzbd from a command line and starts to download the file. The FTP downloads the file to a new directory and makes an account for that file. Sabnzbd then emails my friend with the username (the folder name), password and separate url. With this setup my friends can request something when I am not home and use my connection to download it.
I am sure I have them upload the NZB to SABnzbd and download to their home folder in the FTP, but where is the challenge in that? :p
When the friend uploads the nzb, there is a form attached that asks for an email.
Here is the output of the csv in an html:
"Upload Forms Search" "{startDate=08/04/2009, showFormInfo=true, endDate=08/12/2009, showURLs=true, showPaths=true, export=true, uploadCount=100, reportName=UploadFormsSearch}" "Uploads" ,"Num","Count","Average Speed","Size","Name","Form Info","Local URL" ,"1","1","0 K/sec","5.44 Kb","/TV/selected_filesnzb","'sendemail:Yes', 'email:[email protected]', ","file:/Volumes/TV/selected_files.nzb" ,"2","1","0 K/sec","1.15 Mb","/TV/something_else..nzb","'sendemail:No', 'email:none', ","file:/Volumes/Music/TV/something_else.nzb"
I am sure I have them upload the NZB to SABnzbd and download to their home folder in the FTP, but where is the challenge in that? :p
When the friend uploads the nzb, there is a form attached that asks for an email.
Here is the output of the csv in an html:
"Upload Forms Search" "{startDate=08/04/2009, showFormInfo=true, endDate=08/12/2009, showURLs=true, showPaths=true, export=true, uploadCount=100, reportName=UploadFormsSearch}" "Uploads" ,"Num","Count","Average Speed","Size","Name","Form Info","Local URL" ,"1","1","0 K/sec","5.44 Kb","/TV/selected_filesnzb","'sendemail:Yes', 'email:[email protected]', ","file:/Volumes/TV/selected_files.nzb" ,"2","1","0 K/sec","1.15 Mb","/TV/something_else..nzb","'sendemail:No', 'email:none', ","file:/Volumes/Music/TV/something_else.nzb"
Re: Can you control emails via scripting?
I took a look at the cheetah documentation and found that I may be able to simplify the process by having the emails stored in a template file. If I import that into the email.tmpl file and reference the person email that way, it will be much easier as there are only a hand full of users on my FTP.