fromName := "Growth Team"
subscribed := true
_, err := client.Emails.Send(ctx, &mailglyph.SendEmailParams{
To: "[email protected]",
From: &mailglyph.Recipient{Name: &fromName, Email: "[email protected]"},
Subject: strPtr("Release notes"),
Body: strPtr("<p>Monthly update.</p>"),
Reply: strPtr("[email protected]"),
Name: strPtr("Monthly newsletter"),
Subscribed: &subscribed,
Headers: map[string]string{
"X-Campaign-Id": "monthly-2026-03",
},
})
if err != nil {
panic(err)
}