Page 1 of 1

Email Notification Help

Posted: October 19th, 2012, 2:33 pm
by stanjuan
Hi there

I'm pretty much in the dark in attempting to setup a Email tmpl file to achieve the following
- Sabnzbd to send me an email notification ONLY when my Coachpotato sends a file to SABnzbd.
- The category i want to setup this filter is called "Default".

Has anyone attempted this successfully OR know of some hand sites to help - I'm looking for a quick fix here.

Thanks Community.

Re: Email Notification Help

Posted: October 19th, 2012, 3:43 pm
by stanjuan
This is the code of my template

##
## Default Email template for SABnzbd
## This a Cheetah template
## Documentation: http://sabnzbd.wikidot.com/email-templates
##
## Newlines and whitespace are significant!
##
## These are the email headers
<!--#if $cat == "Default" #--><!--#slurp#-->
subject: SABnzbd has <!--#if $status then "completed" else "failed" #--> job $name
to: $to
from: $from
date: $date
subject: SABnzbd has <!--#if $status then "completed" else "failed" #--> job $name
X-priority: 5
X-MS-priority: 5
## After this comes the body, the empty line is required!

Hi, testing
<!--#if $status #-->
SABnzbd has downloaded "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#-->
<!--#else#-->
SABnzbd has failed to download "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#-->
<!--#end if#-->
Finished at $end_time
Downloaded $size

Results of the job:
<!--#for $stage in $stages #-->
Stage $stage <!--#slurp#-->
<!--#for $result in $stages[$stage]#-->
$result <!--#slurp#-->
<!--#end for#-->
<!--#end for#-->
<!--#if $script!="" #-->
Output from user script "$script" (Exit code = $script_ret):
$script_output
<!--#end if#-->
<!--#if $status #-->
Enjoy!
<!--#else#-->
Sorry!
<!--#end if#-->
<!--#end if#-->

Unfortunately i get a "Email Test Result = Skipped empty message " when i run the test.
Files sent from Coachpotato sent it to Sabnzbd in the "Default" category.

Re: Email Notification Help

Posted: October 19th, 2012, 4:39 pm
by shypike
You're comparing to "Default" instead of "default".
You'ld better check for the empty string too.

Re: Email Notification Help

Posted: October 20th, 2012, 2:21 am
by stanjuan
Thanks for the reply.
I opted last night to change category to "movies" and all is working now.