1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-19 10:54:05 +02:00

41 lines
1.0 KiB
C#
Raw Normal View History

2013-05-19 16:17:32 -07:00
using System;
using NzbDrone.Core.Tv;
2013-05-26 22:44:54 -07:00
namespace NzbDrone.Core.Notifications.Email
{
2013-05-26 22:44:54 -07:00
public class Email : NotificationBase<EmailSettings>
{
2013-05-26 22:44:54 -07:00
private readonly EmailProvider _smtpProvider;
2013-05-26 22:44:54 -07:00
public Email(EmailProvider smtpProvider)
{
_smtpProvider = smtpProvider;
}
public override string Name
{
2013-05-26 22:27:33 -07:00
get { return "Email"; }
}
2013-05-19 16:17:32 -07:00
public override void OnGrab(string message)
{
const string subject = "NzbDrone [TV] - Grabbed";
var body = String.Format("{0} sent to SABnzbd queue.", message);
2013-05-19 16:17:32 -07:00
_smtpProvider.SendEmail(Settings, subject, body);
}
2013-05-19 16:17:32 -07:00
public override void OnDownload(string message, Series series)
{
const string subject = "NzbDrone [TV] - Downloaded";
var body = String.Format("{0} Downloaded and sorted.", message);
2013-05-19 16:17:32 -07:00
_smtpProvider.SendEmail(Settings, subject, body);
}
public override void AfterRename(Series series)
{
}
}
}