smpallen99 / coherence

Coherence is a full featured, configurable authentication system for Phoenix
MIT License
1.27k stars 224 forks source link

Send emails asynchronously #417

Open augnustin opened 5 years ago

augnustin commented 5 years ago

So, coherence is using swoosh to send emails.

I read from their docs, that there is no pre-defined behavior to send emails asynchronously, but to use elixir's Task.

But then, the method that is in charge of sending email in coherence is there and is not configurable.

So it means there is no way to send emails in the background but by forking the repo? Shouldn't there be an option for that? At least a small sendAsync: true option?

Has anyone had the issue and found a solution?

I am aware the repo is unmaintained, but I don't feel like cloning it: I am already maintaining my own fork of ex_admin, it is enough... :sweat:

Thanks

Kurisu3 commented 4 years ago

Maybe will you be insterested on moving to another library that is actively maintained?

augnustin commented 4 years ago

I sure am! Will give it a try when I get some little time.

nesimtunc commented 4 years ago

I started to change every email sending function to make async using Task according to Swoosh's README.

But nothing changed, still sending slow and it doesn't send actually, even it logs sent. There must be a problem with my SMTP server.

Or since I'm a newbie in Elixir world, I might have failed with the implementation. Here you can see my changes.

https://github.com/nesimtunc/coherence/commit/940f87b2b2b5820cb4bddcf274dacb10de3f1b96

nesimtunc commented 4 years ago

Maybe will you be insterested on moving to another library that is actively maintained?

It seems good one but I had problem after changed my db tables' default int primary key to uuid one.

https://github.com/danschultzer/pow/issues/396