Working URLs for template images

This commit is contained in:
Luke Malpass
2018-04-20 16:33:21 +01:00
parent 110e6eeb49
commit 871e589c09
2 changed files with 15 additions and 11 deletions

View File

@ -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);
}
}