snoyberg / mime-mail

Compose MIME email messages.
41 stars 43 forks source link

bcc is not working #22

Closed vagifverdi closed 10 years ago

vagifverdi commented 10 years ago

bcc is ignored by email server and is being instead sent in email header to main recipients.

Here's the part of the raw message: To: vagif.verdi@gmail.com Bcc: vagif@cox.net Subject: Test bcc 2 MIME-Version: 1.0 X-ASG-Orig-Subj: Test bcc 2 Content-Type: text/html; charset=utf-8

snoyberg commented 10 years ago

I'm not sure what mime-mail is supposed to do here, it simply has support for letting you set headers. Is there something it's doing incorrectly?

vagifverdi commented 10 years ago

Indeed, i'm puzzled too. I'm using smtp-mail package. I'll try to test your sendmail functions to see if it makes the difference. I'll let you know of what i find.

vagifverdi commented 10 years ago

Have you ever tried/tested sending email with bcc using this library?

snoyberg commented 10 years ago

Yes, I just tested, and it works. The problem here is that there's a difference between how sendmail on the command line and SMTP work. sendmail automatically strips out the BCC headers. I belive smtp-mail needs to set the bcc list to [] before rendering.

vagifverdi commented 10 years ago

Ic, thx. I'll just change my utility function to send 2 separate emails when bcc is not empty.