Skip to content

Commit

Permalink
Resolved #224 , Removed the 'SSL' option from the email notification …
Browse files Browse the repository at this point in the history
…settings. We will now use the correct secure socket options (SSL/TLS) for your email host.
  • Loading branch information
tidusjar committed May 23, 2016
1 parent d0e6a2a commit 8cce806
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@ public class EmailNotificationSettings : Settings
public bool Enabled { get; set; }
public bool EnableUserEmailNotifications { get; set; }
public string RecipientEmail { get; set; }
public bool Ssl { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
// ************************************************************************/
#endregion
using System;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;

using MailKit.Security;

using MimeKit;
using NLog;

Expand Down Expand Up @@ -162,7 +163,7 @@ private async Task Send(MimeMessage message, EmailNotificationSettings settings)
{
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
// the XOAUTH2 authentication mechanism.
Expand Down
14 changes: 0 additions & 14 deletions PlexRequests.UI/Views/Admin/EmailNotifications.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@

</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="checkbox">

Expand Down

0 comments on commit 8cce806

Please sign in to comment.