-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminate/cancel the currently sending email #720
Comments
|
Hi @princemaple and big thanks for a quick reply, yeah the Thanks 🙏 |
There are actually not that many. This one is documented on the Email module. And provider specific options are documented on respective provider module. |
That's all I can recall at the moment. |
Ohh, I see. But back to my question, passing a timeout to client API ( I can receive the right timeout error now from Finch, but the email is still delivered, which is not desired |
Hmm. I don't know. I may accept PR about this, but I don't think I'll go and implement it, as it's going to be hard to keep hackney and SMTP up to speed. |
I would say that, if you want to cancel it in general, run it inside a task and then send a shutdown/kill signal to the task to terminate it. I don't think swoosh in particular needs to accommodate it. :) |
Is your feature request related to a problem? Please describe.
I need to cancel the delivering process of the email when a timeout is reached. I would like handle by myself when the request should be cancelled
Is your feature request related to a specific adapter? Please specify.
Gmail, but could apply to others as well
Describe the solution you'd like
It could be implemented in various ways, and this one is not the smartest one:
The
deliver
function can receive a worker PID and would listen to its internal messages and in case there would appear something like:terminate
it would cancel the request (email deliver) and exit with a corresponding status atomDescribe alternatives you've considered
probably a configurable timeout in
deliver/2
config argument, I could not clearly find in the docs whatconfig
is supposed to have, probably just some adapters specific configuration, would be nice to have someFinch
configs too, in case it implements those timeout/request cancellations alreadyAdditional context
The text was updated successfully, but these errors were encountered: