-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement e-mailer with events #5
Comments
Extending on this thought... how do we handle e-mail exceptions/failures/errors? Currently there is no option for a newly registered user to get activated, if he does not receive an activation email, due to some error. I have found most user modules do not address this by default. Solutions/Approaches:
|
It depends on the cause. But we may also add a functionality to resend an activation email and to test the email functionality in general. I just found out, that the event case is covered by some sample code in the docs... I think it would be also pretty easy to use a queue with the event system. In fact, that's another reason for using events, since what happens after registration, activation, etc ... may be so complex. |
The email sending errors could also be due to email server issues at that point, (due to system load, smtp timeout, or someone is using a third party service that is down at that point). The use case is - the user may have registered with a genuine email - but he/she did not receive the activation email. The system would also have generated an activation key internally - but we have no way to validate it or send it to the user. Queuing will offer an option to trace and retry such situations. I agree, we could combine both the queue with event system as you said. I will come out with a simple queue structure (which would be an optional plugin to this and enabled by default). You may wish to enhance this with the event system you proposed. |
Queue structure is now available in the |
Just wanted to make sure I understood something. I'm assuming in Module.php that: $this->registrationSettings += [ If this is set to true would mean that they do not need to confirm by email to be made an active user? Sorry if it's an obvious question, just checking, thanks. |
I think it depends on what you want. |
@kartik-v Could you explain a bit, why do we need a mail queue table? Is it mainly for logging? If you have a component in your application which handles a mail queue, we can hand over the sending of a mail to the component. The only problem I see so far is how to return the result of sending the e-mail to the user module, when it is queued or delayed, I think we need an API for that (but maybe not in release 1.0) |
Yes that's correct and as @schmunk42 elaborated
Usage is planned to be like below:
The key advantages:
|
The text was updated successfully, but these errors were encountered: