mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-09-30 22:28:28 +00:00
SSL support for sending mail
This commit is contained in:
@@ -25,12 +25,13 @@
|
||||
// THE SOFTWARE.
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Net.Mail;
|
||||
using System.Text;
|
||||
using Ntp.Analyzer.Config;
|
||||
using Ntp.Analyzer.Config.Root;
|
||||
using Ntp.Analyzer.Log;
|
||||
using Ntp.Process;
|
||||
using Ntp.Analyzer.Config.Root;
|
||||
|
||||
namespace Ntp.Analyzer.Process.Description
|
||||
{
|
||||
@@ -56,6 +57,13 @@ namespace Ntp.Analyzer.Process.Description
|
||||
jobs = new List<Ntp.Process.Job> ();
|
||||
|
||||
client = new SmtpClient (config.SmptServer, config.SmtpPort);
|
||||
|
||||
if (config.SmptUser != null) {
|
||||
client.Credentials = new NetworkCredential(
|
||||
config.SmptUser, config.SmptPass ?? string.Empty);
|
||||
}
|
||||
|
||||
client.EnableSsl = config.EnableSsl;
|
||||
}
|
||||
|
||||
public override bool SingleThread {
|
||||
|
||||
Reference in New Issue
Block a user