public void SendMail() { var sender = new SmtpMailSender(); var mail = new IndividualMail { From = "*****@*****.**", To = "*****@*****.**", Subject = "mail sender test", Body = "mail sender test " + DateTime.Now, IsHtml = false, }; sender.SendMail(mail); }
public static Facade CreateFacade() { var database = new Database(); var configuration = new Configuration(); var passwordManager = new PasswordManager(configuration); var securityTokenService = new Arb.WebApi.Resource.Sts.SecurityTokenService(); var mailSender = new SmtpMailSender(); var mailConfiguration = new MailConfiguration(); var mailNotifier = new MailNotifier(mailSender, mailConfiguration); var documentStore = new SharePointDocumentStore(); var facade = new Facade(database, configuration, passwordManager, securityTokenService, mailNotifier, documentStore); return facade; }