public void Send_Null() { EmailModel email = new EmailModel(); email.To = null; email.Subject = null; email.Message = "*****@*****.**"; email.DeliveryType = "Email"; con.SendEmail(email); }
public void Send_StringEmpty() { EmailModel email = new EmailModel(); email.To = string.Empty; email.Subject = string.Empty; email.Message = "*****@*****.**"; email.DeliveryType = "Email"; con.SendEmail(email); }
public void Send_DeliveryTypeCheckNotEmail() { EmailModel email = new EmailModel(); email.To = "*****@*****.**"; email.Subject = "Test"; email.Message = "*****@*****.**"; email.DeliveryType = "Post"; con.SendEmail(email); }
public void Send_InvalidEmailAddressException() { EmailModel email = new EmailModel(); email.To = "sdfsdfsdf"; email.Subject = "sdfsdf"; email.Message = "*****@*****.**"; email.DeliveryType = "Email"; con.SendEmail(email); }
public void SendGrid_Send() { EmailModel email = new EmailModel(); email.To = "*****@*****.**"; email.Subject = "sdfsdf"; email.Message = "*****@*****.**"; email.DeliveryType = "Email"; EmailEngine execute = new EmailEngine(email); execute.Send(); }
public void Submit(EmailModel email) { if (string.IsNullOrEmpty(email.To) || string.IsNullOrEmpty(email.Subject)) { throw new Exception("Data is not correct"); } MailAddress mail = new MailAddress(email.To); if (email.DeliveryType != "Email") { throw new Exception("Delivery Type not set to type, Email."); } }
public HttpResponseMessage SendEmail(EmailModel email) { if (string.IsNullOrEmpty(email.To) || string.IsNullOrEmpty(email.Subject)) { throw new Exception("Data is not correct"); } MailAddress mail = new MailAddress(email.To); if (email.DeliveryType != "Email") { throw new Exception("Delivery Type not set to type, Email."); } return base.Request.CreateResponse(HttpStatusCode.OK); }
public void Send_ValidEmailAddressTo() { EmailModel email = new EmailModel(); email.To = "*****@*****.**"; email.Subject = "sdfsdf"; email.Message = "*****@*****.**"; email.DeliveryType = "Email"; con.SendEmail(email); }
public EmailEngine(EmailModel email) { }