Skip to content

Commit 0efb817

Browse files
committed
fix lint
1 parent eb2309d commit 0efb817

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/email/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232

3333
fmt.Println("GetAccount Object:", result, " GetAccount Response: ", resp)
3434

35-
br.TransactionalEmailsApi.SendTransacEmail(context.TODO(), brevo.SendSmtpEmail{
35+
_, _, err = br.TransactionalEmailsApi.SendTransacEmail(context.TODO(), brevo.SendSmtpEmail{
3636
Sender: &brevo.SendSmtpEmailSender{
3737
Name: os.Getenv("EMAIL_FROM_NAME"),
3838
Email: os.Getenv("EMAIL_FROM_ADDRESS"),
@@ -46,4 +46,8 @@ func main() {
4646
Subject: "Test Email from Brevo API",
4747
TextContent: "This is a test email sent using the Brevo API.",
4848
})
49+
if err != nil {
50+
fmt.Println("Error when calling TransactionalEmailsApi->sendTransacEmail: ", err.Error())
51+
return
52+
}
4953
}

0 commit comments

Comments
 (0)