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

Open static HTML emails in dev #454

Open
psugihara opened this issue Mar 3, 2023 · 1 comment
Open

Open static HTML emails in dev #454

psugihara opened this issue Mar 3, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@psugihara
Copy link
Collaborator

Problem

Today if your app tries to send an email mailing in development, mailing tries to open it with the preview server. If the preview server is not running, mailing-core spits an error in your app log telling you to boot up the preview server to see emails in dev.

The preview server is very useful for building emails. However, most of your time developing your app is (hopefully) not spend building emails. Making me have mailing open to check that tweaking a web feature will still send my emails is a bit rude.

Proposed solution

If the preview server is not running, mailing-core should just render the email html to a temporary file and open that in your browser. Here's a library that implements a similar strategy: https://www.npmjs.com/package/preview-email

In the future we could also add a banner telling you to use the preview server for editing to make the UX a little more unified.

Big thanks to @m5r for suggesting this.

@psugihara psugihara added enhancement New feature or request good first issue Good for newcomers labels Mar 3, 2023
@alexfarrill
Copy link
Collaborator

Good idea! One thing to think about: there are benefits to the current system in that if you don't want to think about how emails are working (e.g. debugging/developing something that sends a lot of emails, but where the email part is working fine), the current system effectively surpresses seeing them. We may need a way to disable emails. I suppose you could run mailing in --quiet mode if you don't want to see emails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants