We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb2309d commit 0efb817Copy full SHA for 0efb817
1 file changed
cmd/email/main.go
@@ -32,7 +32,7 @@ func main() {
32
33
fmt.Println("GetAccount Object:", result, " GetAccount Response: ", resp)
34
35
- br.TransactionalEmailsApi.SendTransacEmail(context.TODO(), brevo.SendSmtpEmail{
+ _, _, err = br.TransactionalEmailsApi.SendTransacEmail(context.TODO(), brevo.SendSmtpEmail{
36
Sender: &brevo.SendSmtpEmailSender{
37
Name: os.Getenv("EMAIL_FROM_NAME"),
38
Email: os.Getenv("EMAIL_FROM_ADDRESS"),
@@ -46,4 +46,8 @@ func main() {
46
Subject: "Test Email from Brevo API",
47
TextContent: "This is a test email sent using the Brevo API.",
48
})
49
+ if err != nil {
50
+ fmt.Println("Error when calling TransactionalEmailsApi->sendTransacEmail: ", err.Error())
51
+ return
52
+ }
53
}
0 commit comments