Reputation: 55
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
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