Skip to content

BCC addresses are not added #295

Description

@monopolly

What I did:

create a email

What I expected:

email with bcc addresses

What I got:

email without bcc adresses

Release or branch I am using:

1.0.0

The problem

when you build the email in

func (p MailBuilder) Build() (*Part, error)

you don't add BCC field, only CC

if len(p.to) > 0 {
 h.Set("To", stringutil.JoinAddress(p.to))
}
if len(p.cc) > 0 {
 h.Set("Cc", stringutil.JoinAddress(p.cc))
}
if len(p.replyTo) > 0 {
 h.Set("Reply-To", stringutil.JoinAddress(p.replyTo))
}

//no bcc at all

so the email build like this:

Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-8
Date: Thu, 20 Jul 2023 12:01:54 +0300
From: <fff@aaaa.com>
Message-Id: <1689843714@478.aaaa.com>
Mime-Version: 1.0
Subject: =?utf-8?b?0KLQtdC80LA=?=
To: <a@gmail.com>
Cc: <a1@gmail.com>, <a2@gmail.com>

no BCC added

is it OK or you just forget to add BCC array to builder? Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions