Resolved #224 , Removed the 'SSL' option from the email notification settings. We will now use the correct secure socket options (SSL/TLS) for your email host.

pull/226/head
tidusjar 9 years ago
parent d0e6a2a341
commit 8cce80654b

@ -36,6 +36,5 @@ namespace PlexRequests.Core.SettingModels
public bool Enabled { get; set; } public bool Enabled { get; set; }
public bool EnableUserEmailNotifications { get; set; } public bool EnableUserEmailNotifications { get; set; }
public string RecipientEmail { get; set; } public string RecipientEmail { get; set; }
public bool Ssl { get; set; }
} }
} }

@ -25,9 +25,10 @@
// ************************************************************************/ // ************************************************************************/
#endregion #endregion
using System; using System;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks; using System.Threading.Tasks;
using MailKit.Security;
using MimeKit; using MimeKit;
using NLog; using NLog;
@ -162,7 +163,7 @@ namespace PlexRequests.Services.Notification
{ {
using (var client = new SmtpClient()) using (var client = new SmtpClient())
{ {
client.Connect(settings.EmailHost, settings.EmailPort, settings.Ssl); client.Connect(settings.EmailHost, settings.EmailPort, SecureSocketOptions.Auto); // Let MailKit figure out the correct SecureSocketOptions.
// Note: since we don't have an OAuth2 token, disable // Note: since we don't have an OAuth2 token, disable
// the XOAUTH2 authentication mechanism. // the XOAUTH2 authentication mechanism.

@ -30,20 +30,6 @@
</div> </div>
</div> </div>
<div class="form-group">
<div class="checkbox">
@if (Model.Ssl)
{
<input type="checkbox" id="Ssl" name="Ssl" checked="checked"><label for="Ssl">SSL Enabled</label>
}
else
{
<input type="checkbox" id="Ssl" name="Ssl"><label for="Ssl">SSL Enabled</label>
}
</div>
</div>
<div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">

Loading…
Cancel
Save