Skip to content
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

Save email before calling the routes #92

Closed
wants to merge 3 commits into from

Conversation

LucaRed
Copy link

@LucaRed LucaRed commented Oct 28, 2021

If a route throws an Exception, then the email is lost because it won't be saved in the database.

Saving the email before calling the actual route prevents losing messages.
This also fixes #48.

@joelharkes
Copy link

joelharkes commented Aug 11, 2022

@LucaRed fixed in my fork: joelharkes/laravel-mailbox version 3.0.0

Although email is not stored before as your implementation would not work in combination with a fallback or a catchAll route. (it would not save the email even though it should, it does in previous implementation)

@@ -97,10 +103,6 @@ public function callMailboxes(InboundEmail $email)
$matchedRoutes[] = $this->catchAllRoute;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matchRoutes is adapted here which could still lead to a storeEmail() in original code.

@mechelon mechelon closed this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing the ID of an inbound email
3 participants