Email Notification Help

Got a neat new template? Share it here!
Post Reply
stanjuan
Newbie
Newbie
Posts: 3
Joined: October 19th, 2012, 2:22 pm

Email Notification Help

Post 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.
stanjuan
Newbie
Newbie
Posts: 3
Joined: October 19th, 2012, 2:22 pm

Re: Email Notification Help

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Email Notification Help

Post by shypike »

You're comparing to "Default" instead of "default".
You'ld better check for the empty string too.
stanjuan
Newbie
Newbie
Posts: 3
Joined: October 19th, 2012, 2:22 pm

Re: Email Notification Help

Post by stanjuan »

Thanks for the reply.
I opted last night to change category to "movies" and all is working now.
Post Reply