Skip to content

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.

Copy link

@cceneag cceneag left a comment

Choose a reason for hiding this comment

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

@

@rmcsharry
Copy link

@cschilbe I like this idea, thanks for creating the PR as I can see the need for it ... but it's a bit of a pain to have to remember to turn "raw" feature on or off.

How about this?

Couldn't we render a link next to the 'view html' and 'view plain' links for 'view raw'?

That means the feature is always on, and it's a simple click for any particular email the dev might want to inspect headers for? Maybe I am missing something.

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

4 participants