diff --git a/.vs/DeskHubSharp/v15/.suo b/.vs/DeskHubSharp/v15/.suo
index e32bd8d..f924e75 100644
Binary files a/.vs/DeskHubSharp/v15/.suo and b/.vs/DeskHubSharp/v15/.suo differ
diff --git a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide
index 7da5814..96bba70 100644
Binary files a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide and b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-shm b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-shm
index c4d5ca1..2829640 100644
Binary files a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-shm and b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal
index 4614ddd..bf050cb 100644
Binary files a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal and b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/DeskHubSharp/BusinessLayer/Email.cs b/DeskHubSharp/BusinessLayer/Email.cs
index e7a4cfb..e648c47 100644
--- a/DeskHubSharp/BusinessLayer/Email.cs
+++ b/DeskHubSharp/BusinessLayer/Email.cs
@@ -1,19 +1,22 @@
using System;
-using System.Net;
-using System.Net.Mail;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
+using MailKit;
+using MailKit.Net.Smtp;
+using MailKit.Security;
+using MimeKit;
namespace DeskHubSharp
{
class Email
{
// TODO: finish this class
+ // TODO: debug feedback form
- private string _to = "wyatt@wyattjmiller.com";
+ private string _to = "wjmiller2016@gmail.com";
private string _from = "wjmiller2016@gmail.com";
private string _name;
private string _message;
@@ -50,25 +53,33 @@ namespace DeskHubSharp
{
if (IsValidated())
{
- // TODO: get a test email to send
- string subject = $"DeskHubSharp: {_name} requires your attention.";
- string body = $"{_message}";
- MailMessage message = new MailMessage(_from, _to, subject, body);
- SmtpClient client = new SmtpClient("smtp.gmail.com");
- //Console.WriteLine("Changing time out from {0} to 100.", client.Timeout);
- client.Timeout = 1000;
- // Credentials are necessary if the server requires the client
- // to authenticate before it will send e-mail on the client's behalf.
- client.Credentials = CredentialCache.DefaultNetworkCredentials;
-
try
{
- client.Send(message);
+ var err = new ErrorWindow();
+ var message = new MimeMessage();
+ message.From.Add(new MailboxAddress($"{_name}", _from));
+ message.To.Add(new MailboxAddress("Wyatt J. Miller", _to));
+ message.Subject = $"{_name} requires your attention!";
+ message.Body = new TextPart("plain")
+ {
+ Text = _message
+ };
+
+ using (var client = new SmtpClient())
+ {
+ client.Connect("smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect);
+ client.Authenticate(_from, "IhaveanAMDRX580");
+ client.Send(message);
+ client.Disconnect(true);
+ }
+ err.lbl_title.Content = "Thank you!";
+ err.txtblk_error.Text = "Thank you for sending your email! We have it and will reply shortly.";
+ err.ShowDialog();
}
catch (Exception e)
{
ErrorWindow err = new ErrorWindow();
- Console.WriteLine("Exception caught in CreateTimeoutTestMessage(): {0}",
+ Console.WriteLine("Exception caught in sending message: {0}",
e.ToString());
err.ShowDialog();
}
diff --git a/DeskHubSharp/BusinessLayer/Request.cs b/DeskHubSharp/BusinessLayer/Request.cs
index 2ccab10..4cd9905 100644
--- a/DeskHubSharp/BusinessLayer/Request.cs
+++ b/DeskHubSharp/BusinessLayer/Request.cs
@@ -10,12 +10,17 @@ namespace DeskHubSharp
{
class Request
{
+ private string _apiEndpoint = "https://api.github.com/v3/";
+
public Request()
{
}
+ public void SearchRequest()
+ {
+ }
}
}
diff --git a/DeskHubSharp/DeskHubSharp.csproj b/DeskHubSharp/DeskHubSharp.csproj
index 2cb38f3..d7236e3 100644
--- a/DeskHubSharp/DeskHubSharp.csproj
+++ b/DeskHubSharp/DeskHubSharp.csproj
@@ -35,6 +35,15 @@
4
+
+ ..\packages\BouncyCastle.1.8.2\lib\BouncyCastle.Crypto.dll
+
+
+ ..\packages\MailKit.2.0.7\lib\net45\MailKit.dll
+
+
+ ..\packages\MimeKit.2.0.6\lib\net45\MimeKit.dll
+
..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
@@ -43,6 +52,7 @@
+
diff --git a/DeskHubSharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/DeskHubSharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index d4337ea..0190b2a 100644
Binary files a/DeskHubSharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/DeskHubSharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/DeskHubSharp/obj/Debug/DeskHubSharp.csproj.CoreCompileInputs.cache b/DeskHubSharp/obj/Debug/DeskHubSharp.csproj.CoreCompileInputs.cache
index 5a5a1b4..f00acee 100644
--- a/DeskHubSharp/obj/Debug/DeskHubSharp.csproj.CoreCompileInputs.cache
+++ b/DeskHubSharp/obj/Debug/DeskHubSharp.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-96be73db692ee81a8077a343a13bb0e84e99fc14
+b453599d59232d67f8d66bb03989d81f4cf64751
diff --git a/DeskHubSharp/obj/Debug/DeskHubSharp.csprojAssemblyReference.cache b/DeskHubSharp/obj/Debug/DeskHubSharp.csprojAssemblyReference.cache
index 6ace6b4..cf45637 100644
Binary files a/DeskHubSharp/obj/Debug/DeskHubSharp.csprojAssemblyReference.cache and b/DeskHubSharp/obj/Debug/DeskHubSharp.csprojAssemblyReference.cache differ
diff --git a/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.cache b/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.cache
index 35ca60f..bdc68df 100644
--- a/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.cache
+++ b/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.cache
@@ -13,7 +13,7 @@ C:\Users\Wyatt\Desktop\Source\DeskHubSharp\DeskHubSharp\App.xaml
7-86569338
21133474928
-16-2010050379
+20415715258
AboutWindow.xaml;DetailWindow.xaml;ErrorWindow.xaml;FeedbackWindow.xaml;HelpWindow.xaml;MainWindow.xaml;SearchWindow.xaml;
False
diff --git a/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.i.cache b/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.i.cache
index 1537c39..eef41e5 100644
--- a/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.i.cache
+++ b/DeskHubSharp/obj/Debug/DeskHubSharp_MarkupCompile.i.cache
@@ -13,7 +13,7 @@ C:\Users\Wyatt\Desktop\Source\DeskHubSharp\DeskHubSharp\App.xaml
7-86569338
25-65043429
-16-2010050379
+20415715258
AboutWindow.xaml;DetailWindow.xaml;ErrorWindow.xaml;FeedbackWindow.xaml;HelpWindow.xaml;MainWindow.xaml;SearchWindow.xaml;
True
diff --git a/DeskHubSharp/packages.config b/DeskHubSharp/packages.config
index 94c81c3..8966383 100644
--- a/DeskHubSharp/packages.config
+++ b/DeskHubSharp/packages.config
@@ -1,5 +1,8 @@
+
+
+
\ No newline at end of file