상속: System.MarshalByRefObject
예제 #1
0
        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);
        }
예제 #2
0
 public EmailMessage(EmailMessage_Post emailMessage_Post)
     : this()
 {
     To      = emailMessage_Post.To;
     Subject = emailMessage_Post.Subject;
     Message = emailMessage_Post.Message;
 }
예제 #3
0
파일: SendEmails.cs 프로젝트: rbg13/Master
        //Refactor into SMTP class
        public bool send(EmailMessage_Post emailMessagePost)
        {
            if (emailMessagePost.isNull())
            {
                return(false);
            }
            var emailMessage = new EmailMessage(emailMessagePost);

            return(send(emailMessage));
        }
예제 #4
0
 public bool   SendEmail(EmailMessage_Post emailMessagePost)
 {
     return(TmWebServices.SendEmail(emailMessagePost));
 }
예제 #5
0
        //Refactor into SMTP class
        public bool send(EmailMessage_Post emailMessagePost)
        {
            var emailMessage = new EmailMessage(emailMessagePost);

            return(send(emailMessage));
        }
예제 #6
0
 public bool SendEmail(EmailMessage_Post emailMessagePost)
 {
     return TmWebServices.SendEmail(emailMessagePost);
 }
예제 #7
0
 [WebMethod(EnableSession = true)][Admin]                                 public bool         SendEmail(EmailMessage_Post emailMessagePost)
 {
     return(new SendEmails().send(emailMessagePost));
 }
예제 #8
0
 //Refactor into SMTP class
 public bool send(EmailMessage_Post emailMessagePost)
 {
     if (emailMessagePost.isNull())
         return false;
     var emailMessage = new EmailMessage(emailMessagePost);
     return send(emailMessage);
 }
예제 #9
0
 public bool SendEmail(EmailMessage_Post emailMessagePost)
 {
     return new SendEmails().send     (emailMessagePost);
 }
예제 #10
0
 public EmailMessage(EmailMessage_Post emailMessage_Post) : this()
 {
     To      = emailMessage_Post.To;
     Subject = emailMessage_Post.Subject;
     Message = emailMessage_Post.Message;
 }
예제 #11
0
 public bool SendEmail(EmailMessage_Post emailMessagePost)
 {
     admin.demand(); return new SendEmails().send(emailMessagePost);
 }
예제 #12
0
 //Refactor into SMTP class
 public bool send(EmailMessage_Post emailMessagePost)
 {
     var emailMessage = new EmailMessage(emailMessagePost);
     return send(emailMessage);
 }