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},
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},
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:
.