Exemplo n.º 1
0
 private void btnSendMailTemplate_Click(object sender, EventArgs e)
 {
     MailJetClient client   = new MailJetClient("a", "a");
     var           template = client.GetTemplate("JacekFirstTemplate");
     var           response = client.SendTemplateMessage(template.Data[0].ID, new MailAddress("*****@*****.**"),
                                                         new MailAddress("*****@*****.**"), "mail with template", null);
 }
Exemplo n.º 2
0
        private void btnTemplateWithVariable_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> p = new Dictionary <string, object>();

            p.Add("test181017122112updated", "SUPER_VALUE");

            MailJetClient client   = new MailJetClient("a", "a");
            var           template = client.GetTemplate("JacekTemplate1");
            var           response = client.SendTemplateMessage(template.Data[0].ID,
                                                                new MailAddress("*****@*****.**"),
                                                                new MailAddress("*****@*****.**"),
                                                                "mail with template", p);
        }