mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Renamed Smtp to Email
This commit is contained in:
parent
d8259f5cff
commit
0d21f34ec5
5 changed files with 24 additions and 31 deletions
40
NzbDrone.Core/Notifications/Email/Email.cs
Normal file
40
NzbDrone.Core/Notifications/Email/Email.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Notifications.Email
|
||||
{
|
||||
public class Email : NotificationBase<EmailSettings>
|
||||
{
|
||||
private readonly EmailProvider _smtpProvider;
|
||||
|
||||
public Email(EmailProvider 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue