public void SendEmail() { var emailsSent_Before = SendEmails.Sent_EmailMessages.size(); var to = "*****@*****.**"; var subject = "a subject"; var message = "a message"; var emailMessagePost = new EmailMessage_Post { To = to, Subject = subject, Message = message }; TmRest.SendEmail(emailMessagePost); var sentMessages = SendEmails.Sent_EmailMessages; var emailsSent_After = sentMessages.size(); var lastMessage = sentMessages.last(); Assert.IsTrue (new SendEmails().serverNotConfigured()); //Assert.AreEqual (emailsSent_Before , 0); Assert.AreNotEqual(emailsSent_Before , emailsSent_After); Assert.AreEqual (lastMessage.To , emailMessagePost.To); Assert.AreEqual (lastMessage.Subject , emailMessagePost.Subject); Assert.AreEqual (lastMessage.Message , emailMessagePost.Message + TMConsts.EMAIL_DEFAULT_FOOTER); }
public EmailMessage(EmailMessage_Post emailMessage_Post) : this() { To = emailMessage_Post.To; Subject = emailMessage_Post.Subject; Message = emailMessage_Post.Message; }
//Refactor into SMTP class public bool send(EmailMessage_Post emailMessagePost) { if (emailMessagePost.isNull()) { return(false); } var emailMessage = new EmailMessage(emailMessagePost); return(send(emailMessage)); }
public bool SendEmail(EmailMessage_Post emailMessagePost) { return(TmWebServices.SendEmail(emailMessagePost)); }
//Refactor into SMTP class public bool send(EmailMessage_Post emailMessagePost) { var emailMessage = new EmailMessage(emailMessagePost); return(send(emailMessage)); }
public bool SendEmail(EmailMessage_Post emailMessagePost) { return TmWebServices.SendEmail(emailMessagePost); }
[WebMethod(EnableSession = true)][Admin] public bool SendEmail(EmailMessage_Post emailMessagePost) { return(new SendEmails().send(emailMessagePost)); }
//Refactor into SMTP class public bool send(EmailMessage_Post emailMessagePost) { if (emailMessagePost.isNull()) return false; var emailMessage = new EmailMessage(emailMessagePost); return send(emailMessage); }
public bool SendEmail(EmailMessage_Post emailMessagePost) { return new SendEmails().send (emailMessagePost); }
public bool SendEmail(EmailMessage_Post emailMessagePost) { admin.demand(); return new SendEmails().send(emailMessagePost); }
//Refactor into SMTP class public bool send(EmailMessage_Post emailMessagePost) { var emailMessage = new EmailMessage(emailMessagePost); return send(emailMessage); }