phoenix_token_auth icon indicating copy to clipboard operation
phoenix_token_auth copied to clipboard

Send email asynchronously

Open LeeroyDing opened this issue 9 years ago • 4 comments

Lacks exception handling so far.

LeeroyDing avatar Jul 30 '15 03:07 LeeroyDing

hey, thanks for the PR. happy as always :-)

i think we should think about error handling here, though, and not take the easy route. not sure what a good solution would be yet. maybe just making the email part modular and allow users to provide their own implementation. i imagine not everyone might want to use mailgun anyway.

manukall avatar Jul 30 '15 13:07 manukall

Let's save the mailgun thing for later, I believe it will serve most people well.

Sending emails asynchronously would require a different approach of error handling, since you won't know the result at the point you want to send the mail. Do you have any good idea? :)

LeeroyDing avatar Aug 03 '15 02:08 LeeroyDing

i think there's no best way to error handling here. that's why i think we should let users provide their own implementation. some might want to forward the error to something like rollbar, some might want to retry a few times, some might want something completely different.

manukall avatar Aug 03 '15 07:08 manukall

Letting users implement their own mailer sounds good. The problem would be the docs tho.

LeeroyDing avatar Aug 03 '15 09:08 LeeroyDing