1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Notifications/Smtp/Smtp.cs
2013-05-26 22:27:33 -07:00

43 lines
1.1 KiB
C#

using System;
using NLog;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Smtp
{
public class Smtp : NotificationBase<SmtpSettings>
{
private readonly SmtpProvider _smtpProvider;
public Smtp(SmtpProvider smtpProvider)
{
_smtpProvider = smtpProvider;
}
public override string Name
{
get { return "Email"; }
}
public override void OnGrab(string message)
{
const string subject = "NzbDrone [TV] - Grabbed";
var body = String.Format("{0} sent to SABnzbd queue.", message);
_smtpProvider.SendEmail(Settings, subject, body);
}
public override void OnDownload(string message, Series series)
{
const string subject = "NzbDrone [TV] - Downloaded";
var body = String.Format("{0} Downloaded and sorted.", message);
_smtpProvider.SendEmail(Settings, subject, body);
}
public override void AfterRename(Series series)
{
}
}
}