summaryrefslogtreecommitdiff
path: root/Project-Unite/App_Start
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-04 19:01:14 -0400
committerMichael <[email protected]>2017-04-04 19:01:14 -0400
commitc40b6162650af26bc79596e9972408bd8fdd522f (patch)
tree5a7ccb8200e7f88ec2d92102e281ac54538b0284 /Project-Unite/App_Start
parent303ef44a189a120f956eb020858d5b5483aa4b69 (diff)
downloadproject-unite-c40b6162650af26bc79596e9972408bd8fdd522f.tar.gz
project-unite-c40b6162650af26bc79596e9972408bd8fdd522f.tar.bz2
project-unite-c40b6162650af26bc79596e9972408bd8fdd522f.zip
Use SSL instead of TLS when sending mail
Diffstat (limited to 'Project-Unite/App_Start')
-rw-r--r--Project-Unite/App_Start/IdentityConfig.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Project-Unite/App_Start/IdentityConfig.cs b/Project-Unite/App_Start/IdentityConfig.cs
index ef86a5e..6339e1f 100644
--- a/Project-Unite/App_Start/IdentityConfig.cs
+++ b/Project-Unite/App_Start/IdentityConfig.cs
@@ -25,6 +25,8 @@ namespace Project_Unite
var siteConfig = new ApplicationDbContext().Configs.FirstOrDefault();
var smtp = new SmtpClient(siteConfig.SMTPServer, siteConfig.SMTPPort);
+ if (siteConfig.UseTLSEncryption)
+ smtp.EnableSsl = true; //This is misleading... We want TLS but all we have is SSL. Oh well.
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(siteConfig.SMTPUsername, siteConfig.SMTPPassword);
var sMsg = new MailMessage(siteConfig.SMTPReturnAddress, message.Destination);