mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #157] Feature Request: Print email content only #106
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mfrieling on GitHub (Aug 31, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/157
Currently the browser print function prints the whole Mailpit window but doesn't scroll the mail content iframe. Thus the email itself is cut off and only partially printed. It would be helpful to have a print function (mainly or HTML but possibly for Text as well) which only prints the iframe content. This way the email content could be saved as PDF for further discussion with customers. This is especially important when the email under development doesn't yet look as expected in certain clients and therefore releasing and sending it to the customer makes no sense as his client would display it wrong.
@axllent commented on GitHub (Sep 2, 2023):
@mfrieling I do not think that having the ability to print either to paper or PDF will do what you are wanting for the following reasons:
If anything, what you actually need is probably a screenshot of the email rather than a "printed" version. The issue here is that tools like html2canvas or modern-screenshot, which use JavaScript to render a screenshot image of a page (or the HTML message in this case), do not simply allow all remote images/files (a standard browser security feature). This security policy complicates matters as all remote assets then need to be proxied via Mailpit so the browser "sees" them as all coming from the same host as Mailpit. Technically this would work (I think, with enough work), however if Mailpit is running for instance in a docker environment, then there is a chance it doesn't have direct access to the assets (eg: local DNS) like your browser does, and this would result in missing images in the screenshot.
I will keep experimenting with a few potential screenshot solutions, but I can't promise anything at this stage.
@axllent commented on GitHub (Sep 6, 2023):
The ability to take screenshots has been released with v1.8.3