mailman-elixir / mailman

Mailman provides a clean way of defining mailers in your Elixir applications
https://github.com/mailman-elixir/mailman
Other
203 stars 73 forks source link

CC/BCC emails aren't sent #61

Closed skosch closed 8 years ago

skosch commented 8 years ago

This may be related to vagabond/gen_smtp#11 – CC'ed emails show up in the header but aren't being sent, and BCC'ed addresses are ignored entirely.

Am I doing it wrong? Is this an issue with the mailserver I'm using? Please enlighten me!

(Other than that, 100 × thank you for this amazing library!)

skosch commented 8 years ago

.... or maybe I'm misunderstanding what CC and BCC are supposed to do, and they're really just headers – but in that case, you need an extra field for specifying the "To" header, since to is already used to list all recipients.

skosch commented 8 years ago

Never mind me, I now see how it works. For others: if you want CC/BCC emails to be delivered, call Mailman.deliver(email, config, :send_cc_and_bcc). I feel like this should be documented somewhere?

mworrell commented 5 years ago

The send_cc_and_bcc option seems to be implemented by Mailman.

gen_smtp_client is all about sending an email to a certain recipient (envelop). It doesn't look at the headers in the email to determine the recipient.

gen_smtp_client can send to multiple recipients at once, if and only if they are all accepted by the same relaying server (eg. a defined relay or all on the same domain).