Instantiate kannon cli
sender := kannon.Sender{
Email: "[email protected]",
Alias: "Kannon",
}
k := kannon.NewKannon(
"<YOUR DOMAIN>",
"<API KEY>",
sender,
"<YOU KANNON API HOST>",
)
html := `...`;
recipents := []kannon.Recipient{
{
Email: "[email protected]",
Fields: kannon.Fields{
"name": "Test",
},
},
}
res, err := k.SendEmail(
recipents,
"This is an email from kannon.go",
html,
);
templateID := `...`;
recipents := []kannon.Recipient{
{
Email: "[email protected]",
Fields: kannon.Fields{
"name": "Test",
},
},
}
res, err := k.SendTemplate(
recipents,
"This is an email from kannon.go",
templateID,
);