public void Setup() { _mailerBase = new MailerBase(); }
public void Test_LinkedResourceProvider() { var mailer = new MailerBase(); var linkResourceProvider = new Mock<ILinkedResourceProvider>(); mailer.LinkedResourceProvider = linkResourceProvider.Object; Assert.AreEqual(linkResourceProvider.Object, mailer.LinkedResourceProvider); }
private void SendConfirmationEmails() { try { var body = "<p>Email From: {0} ({1})</p><p>Message:</p><p>{2}</p>"; var mailer = new MailerBase(); var fromEmailId = @System.Configuration.ConfigurationManager.AppSettings["mailId"]; var toEmailId = @System.Configuration.ConfigurationManager.AppSettings["mailToCC"]; //var ccEmailId = @System.Configuration.ConfigurationManager.AppSettings["mailTo"]; var email = mailer.Populate(x => { x.From = new MailAddress(fromEmailId); x.Subject = "Creation of New Merchant In Systems"; x.To.Add(toEmailId); x.Body = body; x.IsBodyHtml = true; x.ViewName = "Confirmation"; }); email.Send(); } catch (Exception e) { return; } }
public void Setup() { MailerBase.IsTestModeEnabled = true; _mailerBase = new MailerBase(); _mailMessage = new MailMessage(); _mockMailer = new Mock<MailerBase>(); _mockMailer.CallBase = true; }