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

Table Borders on Previews and sends #1846

Closed
nachobazz opened this issue Apr 26, 2024 · 4 comments
Closed

Table Borders on Previews and sends #1846

nachobazz opened this issue Apr 26, 2024 · 4 comments
Labels
question Further information is requested

Comments

@nachobazz
Copy link

Version:

  • listmonk: v3.0.0
  • OS: Ubuntu

Description of the bug and steps to reproduce:
Create a raw HTML content campaign pasting a normal responsive HTML template such as: https://github.com/leemunroe/responsive-html-email-template/blob/master/email-inlined.html

Both the preview and sent email show all major TABLE borders as grey 1px despite the HTML and CSS indicate they should be invisible. I tested this with several templates and always got the same result.

Any idea why it could be?

Screenshots:
Here's a screenshot of how the template looks in preview. Sent email looks identical when received in gmail. I'm under the impression a CSS stylesheet may be overriding some of the styles at send and preview time.

SCR-20240426-pqp

@nachobazz nachobazz added the bug Something isn't working label Apr 26, 2024
@knadh knadh removed the bug Something isn't working label Apr 27, 2024
@knadh
Copy link
Owner

knadh commented Apr 27, 2024

I am not sure. It could be G-mail stripping styles. Are styles inline? If you set the mode to Raw HTML in listmonk, it does not make any changes to HTML or CSS.

@nachobazz
Copy link
Author

It doesn't modify but, it does seem to add a chunk of HTML before the raw HTML which looks like this:

`<!doctype html>

<title>IMPORTANTE: Playbook de incidentes de seguridad</title> <style> body { background-color: #F0F1F3; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, sans-serif; font-size: 15px; line-height: 26px; margin: 0; color: #444; }
        pre {
            background: #f4f4f4f4;
            padding: 2px;
        }

        table {
            width: 100%;
            border: 1px solid #ddd;
        }
        table td {
            border-color: #ddd;
            padding: 5px;
        }

        .wrap {
            background-color: #fff;
            padding: 30px;
            max-width: 525px;
            margin: 0 auto;
            border-radius: 5px;
        }

        .button {
            background: #0055d4;
            border-radius: 3px;
            text-decoration: none !important;
            color: #fff !important;
            font-weight: bold;
            padding: 10px 30px;
            display: inline-block;
        }
        .button:hover {
            background: #111;
        }

        .footer {
            text-align: center;
            font-size: 12px;
            color: #888;
        }
            .footer a {
                color: #888;
                margin-right: 5px;
            }

        .gutter {
            padding: 30px;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        a {
            color: #0055d4;
        }
            a:hover {
                color: #111;
            }
        @media screen and (max-width: 600px) {
            .wrap {
                max-width: auto;
            }
            .gutter {
                padding: 10px;
            }
        }
    </style>
</head>
 
`

The style affecting the template is this:

table { width: 100%; border: 1px solid #ddd; }

But a few others are undesirable as they set arbitrary width for the template and reduce flexibility.

This seems to be embedded to all emails and it does affect the styles of a raw HTML to be sent. Could I suggest a feature to disable this optionally for raw HTML emails? Most templates include their boilerplate and this affects compatibilty.

Please advise if this is a good suggestion to incorporate in the future.

@knadh
Copy link
Owner

knadh commented Apr 29, 2024

This is your default template being applied to the campaign e-mail. Please go to Campaigns -> Template and edit the default campaign template to suite your needs. If your campaign is fully self-contained and doesn't need stored templates, remove all HTML from the default template and simply leave {{ content . }} there.

@knadh knadh closed this as completed Apr 29, 2024
@knadh knadh added the question Further information is requested label Apr 29, 2024
@nachobazz
Copy link
Author

Thanks @knadh. I can't believe I didn't look into the templates section. Apologies for the miss-report 🙏

Repository owner deleted a comment May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants