Skip to content

Commit

Permalink
SSL Email
Browse files Browse the repository at this point in the history
SSL Email
  • Loading branch information
Alaeddinalhamoud committed Jul 9, 2018
1 parent 93dcfda commit 149c458
Show file tree
Hide file tree
Showing 46 changed files with 163 additions and 24 deletions.
Binary file added .vs/MyBlog-website/DesignTimeBuild/.dtbcache
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion .vs/config/applicationhost.config
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
</site>
<site name="MyBlog.UI" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.UI" />
<virtualDirectory path="/" physicalPath="C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.UI" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:58025:localhost" />
Expand Down
Binary file modified MyBlog.Data/bin/Debug/MyBlog.Data.dll
Binary file not shown.
Binary file modified MyBlog.Data/bin/Debug/MyBlog.Data.pdb
Binary file not shown.
6 changes: 6 additions & 0 deletions MyBlog.Data/obj/Debug/MyBlog.Data.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBl
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.csprojResolveAssemblyReference.cache
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.dll
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\bin\Debug\MyBlog.Data.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\bin\Debug\MyBlog.Data.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.csprojAssemblyReference.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.csproj.CoreCompileInputs.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Data\obj\Debug\MyBlog.Data.pdb
Binary file modified MyBlog.Data/obj/Debug/MyBlog.Data.dll
Binary file not shown.
Binary file modified MyBlog.Data/obj/Debug/MyBlog.Data.pdb
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Data.dll
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Data.pdb
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Repo.dll
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Repo.pdb
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Service.dll
Binary file not shown.
Binary file modified MyBlog.Repo/bin/Debug/MyBlog.Service.pdb
Binary file not shown.
Empty file.
16 changes: 16 additions & 0 deletions MyBlog.Repo/obj/Debug/MyBlog.Repo.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,19 @@ C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBl
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.csprojResolveAssemblyReference.cache
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.dll
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Repo.dll.config
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Repo.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Repo.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\EntityFramework.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\EntityFramework.SqlServer.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Data.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Service.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Data.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\MyBlog.Service.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\EntityFramework.xml
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\bin\Debug\EntityFramework.SqlServer.xml
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.csprojAssemblyReference.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.csproj.CoreCompileInputs.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.csproj.CopyComplete
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Repo\obj\Debug\MyBlog.Repo.pdb
Binary file modified MyBlog.Repo/obj/Debug/MyBlog.Repo.dll
Binary file not shown.
Binary file modified MyBlog.Repo/obj/Debug/MyBlog.Repo.pdb
Binary file not shown.
Binary file modified MyBlog.Service/bin/Debug/MyBlog.Data.dll
Binary file not shown.
Binary file modified MyBlog.Service/bin/Debug/MyBlog.Data.pdb
Binary file not shown.
Binary file modified MyBlog.Service/bin/Debug/MyBlog.Service.dll
Binary file not shown.
Binary file modified MyBlog.Service/bin/Debug/MyBlog.Service.pdb
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBl
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.csprojResolveAssemblyReference.cache
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.dll
C:\Users\Alaeddin\Documents\Visual Studio 2015\Projects\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\bin\Debug\MyBlog.Service.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\bin\Debug\MyBlog.Service.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\bin\Debug\MyBlog.Data.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\bin\Debug\MyBlog.Data.pdb
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.csprojAssemblyReference.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.csproj.CoreCompileInputs.cache
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.csproj.CopyComplete
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.dll
C:\Users\Alaeddin\Desktop\Temp\VS\MyBlog-ASP.NET-MVC5\MyBlog.Service\obj\Debug\MyBlog.Service.pdb
Binary file modified MyBlog.Service/obj/Debug/MyBlog.Service.dll
Binary file not shown.
Binary file modified MyBlog.Service/obj/Debug/MyBlog.Service.pdb
Binary file not shown.
21 changes: 8 additions & 13 deletions MyBlog.UI/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
using Facebook;
using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.OAuth;
using MyBlog.Data;
using MyBlog.Service;
using MyBlog.UI.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Security.Claims;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using System.Web.Security;

namespace MyBlog.UI.Controllers
{

public class AccountController : Controller
{
private readonly IAuthentication repositoryIAuthentication;
Expand Down Expand Up @@ -365,15 +359,16 @@ public void EMailPasswordSender(string receiver,string Password)
mail.Subject = "Your Password";
string HashUserPassword = repositoryDEncryption.Decrypt(Password);
mail.Body = HashUserPassword;

// SmtpServer.Port = _emailsetting.SMTPServer_Port;
SmtpServer.UseDefaultCredentials = false;
SmtpServer.Port = _emailsetting.SMTPServer_Port;
string HashEmailPassword = repositoryDEncryption.Decrypt(_emailsetting.Password);
SmtpServer.Credentials = new NetworkCredential(_emailsetting.UserName, HashEmailPassword);
SmtpServer.Credentials = new NetworkCredential(_emailsetting.UserName, HashEmailPassword);
NetworkCredential Credentials = new NetworkCredential(_emailsetting.Sender, HashEmailPassword);
SmtpServer.Credentials = Credentials;
// SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network;
// SmtpServer.UseDefaultCredentials = true;
// SmtpServer.EnableSsl = _emailsetting.EnableSSL;

SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network;

SmtpServer.EnableSsl = _emailsetting.EnableSSL;

SmtpServer.Send(mail);
}
Expand Down
1 change: 1 addition & 0 deletions MyBlog.UI/MyBlog.UI.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<WebStackScaffolding_DbContextTypeFullName>MyBlog.Domain.DAL.EFDbContext</WebStackScaffolding_DbContextTypeFullName>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>Default Settings</NameOfLastUsedPublishProfile>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
Expand Down
10 changes: 5 additions & 5 deletions MyBlog.UI/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<connectionStrings>
<!-- <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-MyBlog.UI-20161008074339.mdf;Initial Catalog=aspnet-MyBlog.UI-20161008074339;Integrated Security=True" providerName="System.Data.SqlClient" /> -->
<add name="EFDbContext" connectionString="Data Source=.;Initial Catalog=MyBlogDB; Integrated Security=true " providerName="System.Data.SqlClient" />
<add name="EFDbContext" connectionString="Data Source=.;Initial Catalog=MyBlog; Integrated Security=true " providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="owin:AutomaticAppStartup" value="false" />
Expand All @@ -28,10 +28,10 @@
<add key="DisplayLocalCommentWidget" value="block" />
<add key="DisplayFBLogin" value="none" />
<add key="DisplayRegister" value="block" />
<add key="FBAppID" value="1769696060019750" />
<add key="FBAppSecret" value="f5c68a5479b2552f172e697296b4eec6" />
<add key="GoogleSitekey" value="6LdzOw8UAAAAAOrxSXL8_cMQgQZhX4K0CNrMlYaw" />
<add key="GoogleSecretkey" value="6LdzOw8UAAAAAN8ueVJn7sfwcHG_ZavUOferN7ik" />
<add key="FBAppID" value="" />
<add key="FBAppSecret" value="" />
<add key="GoogleSitekey" value="" />
<add key="GoogleSecretkey" value="" />
</appSettings>
<system.web>
<customErrors mode="Off" />
Expand Down
Binary file modified MyBlog.UI/bin/MyBlog.Data.dll
Binary file not shown.
Binary file modified MyBlog.UI/bin/MyBlog.Data.pdb
Binary file not shown.
Binary file modified MyBlog.UI/bin/MyBlog.Repo.dll
Binary file not shown.
17 changes: 17 additions & 0 deletions MyBlog.UI/bin/MyBlog.Repo.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Binary file modified MyBlog.UI/bin/MyBlog.Repo.pdb
Binary file not shown.
Binary file modified MyBlog.UI/bin/MyBlog.Service.dll
Binary file not shown.
Binary file modified MyBlog.UI/bin/MyBlog.Service.pdb
Binary file not shown.
Binary file modified MyBlog.UI/bin/MyBlog.UI.dll
Binary file not shown.
10 changes: 5 additions & 5 deletions MyBlog.UI/bin/MyBlog.UI.dll.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<connectionStrings>
<!-- <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-MyBlog.UI-20161008074339.mdf;Initial Catalog=aspnet-MyBlog.UI-20161008074339;Integrated Security=True" providerName="System.Data.SqlClient" /> -->
<add name="EFDbContext" connectionString="Data Source=.;Initial Catalog=MyBlogDB; Integrated Security=true " providerName="System.Data.SqlClient" />
<add name="EFDbContext" connectionString="Data Source=.;Initial Catalog=MyBlog; Integrated Security=true " providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="owin:AutomaticAppStartup" value="false" />
Expand All @@ -28,10 +28,10 @@
<add key="DisplayLocalCommentWidget" value="block" />
<add key="DisplayFBLogin" value="none" />
<add key="DisplayRegister" value="block" />
<add key="FBAppID" value="1769696060019750" />
<add key="FBAppSecret" value="f5c68a5479b2552f172e697296b4eec6" />
<add key="GoogleSitekey" value="6LdzOw8UAAAAAOrxSXL8_cMQgQZhX4K0CNrMlYaw" />
<add key="GoogleSecretkey" value="6LdzOw8UAAAAAN8ueVJn7sfwcHG_ZavUOferN7ik" />
<add key="FBAppID" value="" />
<add key="FBAppSecret" value="" />
<add key="GoogleSitekey" value="" />
<add key="GoogleSecretkey" value="" />
</appSettings>
<system.web>
<customErrors mode="Off" />
Expand Down
Binary file modified MyBlog.UI/bin/MyBlog.UI.pdb
Binary file not shown.
Empty file.
Loading

0 comments on commit 149c458

Please sign in to comment.