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

Request for monospace on plain-text body #462

Closed
GDmac opened this issue Jun 4, 2021 · 11 comments
Closed

Request for monospace on plain-text body #462

GDmac opened this issue Jun 4, 2021 · 11 comments

Comments

@GDmac
Copy link

GDmac commented Jun 4, 2021

Thank you for a great tool to catch mail in development.
Would it be possible to set a formatting CSS style on the element of the plaintext?

element.style {
    font-family: monospace;
    white-space: pre-wrap;
}
@sj26
Copy link
Owner

sj26 commented Jun 7, 2021

I did this on purpose because most modern mail clients display plain text mail as regular text without fixed width fonts. Gmail, for instance. You can often configure clients to display fixed width fonts, but it's a departure from typical configuration.

@GDmac
Copy link
Author

GDmac commented Jun 7, 2021

Can we at least have white-space: pre-wrap; then ?

@sj26
Copy link
Owner

sj26 commented Jul 17, 2021

After a bit of poking around this does seem like a good idea. Fixed in e6f8397.

@sj26 sj26 closed this as completed Jul 17, 2021
@GDmac
Copy link
Author

GDmac commented Jul 20, 2021

Whoo hoo
download

@sj26
Copy link
Owner

sj26 commented Jul 20, 2021

To try it out in the latest beta:

gem install --pre mailcatcher

Edit: Also now shipped in v0.8.0, so you can also upgrade with:

gem install mailcatcher

@GDmac
Copy link
Author

GDmac commented Jul 27, 2021

docker-compose

    mail:
        image: sj26/mailcatcher
        expose:
            - "1025"
        ports:
            - "1080:1080"

Pulling mail (sj26/mailcatcher:)...
latest: Pulling from sj26/mailcatcher
...
Status: Downloaded newer image for sj26/mailcatcher:latest

cli: mailcatcher --version
mailcatcher 0.7.1

@sj26
Copy link
Owner

sj26 commented Jul 27, 2021

Whoops, I forgot to bump latest, sorry! Try it again.

@GDmac
Copy link
Author

GDmac commented Jul 28, 2021

Tested (v.0.8.1), it's not working

<iframe class="body" data-flexie-id="3" data-flexie-parent="true" style="" src="/messages/1.plain">
  <html>
    <head></head>
      <body>
        Orderlist Supplier Foo
        <br>
        <br>
        Orderlist : 202 
        <br>
        Date : 2021-07-28 07:51:08
        <br>
        ...

@sj26
Copy link
Owner

sj26 commented Aug 1, 2021

Weird! I can't replicate this. It's working fine on Safari, Firefox and Chrome for me when using latest MailCatcher v0.8.1. I get an inspector like this:

image

Can you provide a reproduction case? Or more details?

That "src" starting with a slash "/" makes me think you might not be running the latest version? Relative paths were introduced in 0.8.

@GDmac
Copy link
Author

GDmac commented Aug 2, 2021

Yes, it's working, css coming thru (probably container was hanging in there).
Thanks for the heads up.

All in all, without the monospace font still not optimal for me,
the sans-serif has to many width-changes for it to align.
(in my real mail-client i have set monospace for plain-text messages)

@sj26
Copy link
Owner

sj26 commented Aug 3, 2021

Great!

I do appreciate that some folks may prefer monospace, but that's not a default in most contemporary mail clients, and so I don't think it shoud be a default here. It'd be nice to have a button for switching to monospace and back eventually, but that's likely to happen after a redo of the whole frontend (#473).

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

No branches or pull requests

2 participants