carlo suarez
carlo suarez

Reputation: 55

how to include CC and BCC in email using Go

How to add CC and BCC on my email function in Go.

Here is my code

err := smtp.SendMail(
 "smtp.zoho.com",
 587,
 config.Email_id,
 config.Email_password,
 []string{email_to},

Upvotes: 0

Views: 2974

Answers (1)

Jonathan Hall
Jonathan Hall

Reputation: 79674

That depends on which mail library you're using. But the short version is: Just add the Cc: and Bcc: headers as usual, same as you do for any other header, such as Subject: or To:.

Upvotes: 5

Related Questions