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

Always returns :ok? #13

Closed houshuang closed 9 years ago

houshuang commented 9 years ago

This is a great library, and I'm using it to send hundreds of personalized emails per day through Amazon SES. However, it seems that it always returns :ok, no matter if it was successful or not - even on completely made up domains (I'm using the external_smtp module).

This becomes especially important because Amazon has some rate limiting, and I should be able to retry if a mail fails, etc.

(Actually do you know of any library for sending large amounts of emails which handle throttling, retrying, etc? Would be incredibly useful - but knowing if a delivery succeeded or not is the first step).

thanks!

kamilc commented 9 years ago

Yah, it seems that we should incorporate some success/error checking. Thank you for the suggestion. I'm not aware of any high level email sending libraries but it seems that the behaviors you're after are pretty general and could be encapsulated in a library.

kamilc commented 9 years ago

I've just merged in the pull request that drops the Async usage from sending. The function call now returns the underlying execution info from gen_smtp. I'm closing the ticket.