sofn-xyz / mailing

Build, test, send emails with React
https://www.mailing.run
MIT License
3.6k stars 74 forks source link

Intercepted emails are not redirected to the browser from a container #495

Open sebhulse opened 3 months ago

sebhulse commented 3 months ago

Describe the bug When running the mailing dev server from within a docker container, intercepted emails are not redirected to the browser. Related feature request: https://github.com/sofn-xyz/mailing/issues/496

To Reproduce Steps to reproduce the behavior:

  1. Build a NextJS project into a docker container with the node:latest image
  2. Run the container
  3. Open a terminal in the container
  4. Start the mailing dev server
  5. Trigger an email send from the NextJS app

Expected behavior Mailing should redirect the user to the email preview in the browser e.g. http://localhost:3883/intercepts/

Instead, the URL is not displayed in the browser and the logs from the terminal need to be checked to get the ID of the intercept/preview and the URL needs to be manually accessed via the browser.

I may require some additional configuration for my docker setup to forward browser redirects to the host browser - please advise!

Note that email intercepts work on my machine when running yarn mailing from the host OS, but I'm trying to build a more user-friendly devcontainer setup, hence the requirement to run mailing from within docker. Thanks!

Desktop (please complete the following information):

Additional context Add any other context about the problem here.