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); }
public void TemplateMessage() { var result = _client.SendTemplateMessage(26171, new MailAddress(ToAddress, "MailJet TO"), new MailAddress(FromAddress, "MailJet From"), "MailJet.NET Template TEST", new Dictionary <string, object>() { { "FirstName", "Test User Param" } }); }
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); }