From 871e589c097f1d97dd914bef5f75312b39b10b07 Mon Sep 17 00:00:00 2001 From: Luke Malpass Date: Fri, 20 Apr 2018 16:33:21 +0100 Subject: [PATCH] Working URLs for template images --- .../EmailSendTester/Program.cs | 22 +++++++++++-------- .../Template/Source/Html/index.dhtml | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Email HTML Template/EmailSendTester/Program.cs b/Email HTML Template/EmailSendTester/Program.cs index 55d9a63..06dd27f 100644 --- a/Email HTML Template/EmailSendTester/Program.cs +++ b/Email HTML Template/EmailSendTester/Program.cs @@ -14,17 +14,21 @@ namespace EmailSendTester var username = "noreply@fasetto.com"; var password = "somepassword"; - var msg = new MailMessage("noreply@fasetto.com", "contact@angelsix.com"); + var msg = new MailMessage("noreply@fasetto.com", "contact@angelsix.com") + { + Subject = "Verify Your Account", + Body = File.ReadAllText(@"C:\Users\Luke\Desktop\email.txt"), + IsBodyHtml = true + }; - msg.Subject = "Verify Your Account"; - msg.Body = File.ReadAllText(@"C:\Users\Luke\Desktop\Email\emailtest.txt"); - msg.IsBodyHtml = true; + var smtpClient = new SmtpClient + { + Credentials = new NetworkCredential(username, password), + Host = "smtp.office365.com", + Port = 587, + EnableSsl = true + }; - var smtpClient = new SmtpClient(); - smtpClient.Credentials = new NetworkCredential(username, password); - smtpClient.Host = "smtp.office365.com"; - smtpClient.Port = 587; - smtpClient.EnableSsl = true; smtpClient.Send(msg); } } diff --git a/Email HTML Template/Template/Source/Html/index.dhtml b/Email HTML Template/Template/Source/Html/index.dhtml index 79d1724..31be090 100644 --- a/Email HTML Template/Template/Source/Html/index.dhtml +++ b/Email HTML Template/Template/Source/Html/index.dhtml @@ -15,7 +15,7 @@ - + @@ -98,7 +98,7 @@ - +