-
Notifications
You must be signed in to change notification settings - Fork 39
feat: allow mails to be intercepted using events #120
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
Conversation
I'm going to try this tomorrow, today is national holiday where I live.. |
Todo: write tests for this configuration. |
It works! I think it is way simpler solution, and does not require mocking mailer at all which is a good thing. Only thing people have to keep in mind now is that using these new methods, emails could be actually sent out if you do not implement dummy mailer I had to slightly change my mailer, but it was simply broken and I didn't know it |
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Alternative for #117.
@mikk150 could you give this a go?
The idea behind this PR is to alternatively allow you to use the
beforeSend
orafterSend
events for logging mails.This should work by just setting a configuration in the module config; set
mailMethod
tobefore
in the codeption config.Let me know what you think; thanks for your contribution in #117 and bringing this feature to Codeception.