beyondcode / beyondcode/laravel-mailbox

302 redirection for inbound email handling for real emails using Mailgun

Open
#109 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
1.1k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

I am using laravel-mailbox on laravel 8 with mailgun driver. I only need to simply forward the email message. The setup works fine and successfully forwards the email as expected when using `mailgun sample webhook` but not with realworld emails. When an email is sent from gmail or other medium to the mailgun domain configured, application redirects with a `302`
![image](https://user-images.githubusercontent.com/24600191/180155224-aa0dfef4-28ca-4def-a854-426d1bc923cd.png)
![image](https://user-images.githubusercontent.com/24600191/180155906-aa43087c-b48e-4d70-b0b2-a5fd02a63811.png)

to the root domain. I have tried clearing cache also adding the route `laravel-mailbox/mailgun/mime` to exclude `csrftoken` in the middleware, but no luck. Has anyone encountered this? Any help is greatly appreciated.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the Mailgun sample webhook with a real email sent to the configured Mailgun domain, focusing on the laravel-mailbox/laravel-mailbox/mailgun/mime route and its middleware behavior. Reproduce the 302 redirect and verify that real inbound emails are forwarded without redirecting to the root domain.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.