drewr / postal

Clojure email support
MIT License
587 stars 85 forks source link

Only bcc #28

Closed siscia closed 12 years ago

siscia commented 12 years ago

Hi,

what if I what/need send only to bcc, without any "to" ?

it is possible ?

It should...

drewr commented 12 years ago

I'm hesitant to support this because I dislike it so much, but you're correct that it's a staple of SMTP behavior. Let me think about it.

siscia commented 12 years ago

Well if you have any web service you may want to send the same email to thousand of people, it is just a better idea to just send one email with a thousand of bcc than a thousand of email with a single address...

drewr commented 12 years ago

Normally you get around that by supplying a dummy To: address.

siscia commented 12 years ago

Yeah, but I just don't like the idea... By the way the thousand of user will see the dummy To: address...

It is just not very elegant IMO

drewr commented 12 years ago

I didn't read my own code carefully enough. After adding a test for this behavior I realized it already works. Behold, this should do exactly what you'd expect:

{:from "foo@bar.dom"
 :bcc "baz@bar.dom"
 :subject "Test"
 :body "Only Bcc!!"})
siscia commented 12 years ago

I did actually try it... And didn't work, I tried now again and it work...

Sorry I guess I had made some mistake the first time I tried then...

I feel dumb... Sorry...

drewr commented 12 years ago

No problem! I should have verified earlier.