Exemplo n.º 1
0
 public MailBuilder EnableBcc(string email)
 {
     sendgrid.EnableBcc(email);
     return(this);
 }
        public void Test_EnablingBcc()
        {
            var mail = BasicMailBuilder
             .EnableBcc("*****@*****.**")
             .Build();

            var message = new SendGridMessage();
            message.EnableBcc("*****@*****.**");
            Assert.IsFalse(string.IsNullOrEmpty(message.Header.JsonString()));
            Assert.AreEqual(message.Header.JsonString(), mail.Header.JsonString());
        }
Exemplo n.º 3
0
        public void EnableBcc()
        {
            var header = new Header();
            var sendgrid = new SendGridMessage(header);

            var email = "*****@*****.**";
            sendgrid.EnableBcc(email);

            var json = header.JsonString();
            Assert.AreEqual("{\"filters\" : {\"bcc\" : {\"settings\" : {\"enable\" : \"1\",\"email\" : \"" + email + "\"}}}}",
                json);
        }