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

Add raw template to show headers and content for debugging #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cschilbe
Copy link

@cschilbe cschilbe commented Aug 23, 2024

Why was this PR created

In some cases, it is useful to be able to see the raw message including all headers. This is useful in debugging headers and/or body content.

This resolves #218

What is included in this PR

raw.html.erb includes all the parsed content of the default template but also displays the raw content of the email body.

@nashby
Copy link
Collaborator

nashby commented Aug 24, 2024

@cschilbe hey! Thanks for the PR but I'm not sure that's something this gem needs (as we try to keep it as simple as possible) since you can just open devtools and see raw content of the email. Or are there something that you can't see in devtools?

@cschilbe
Copy link
Author

cschilbe commented Aug 26, 2024

@cschilbe hey! Thanks for the PR but I'm not sure that's something this gem needs (as we try to keep it as simple as possible) since you can just open devtools and see raw content of the email. Or are there something that you can't see in devtools?

In my case mail is processed by interceptors that alter or add headers when sent. Specifically the X-SMTP headers used by sendgrid. This makes it difficult to preview the final version with all headers.

This seemed like a pretty simple and beneficial addition to the gem especially given the existing template mechanism but understandable that you'd not want to introduce unnecessary features.

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.

Template including raw email copy
2 participants