-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Error : importing external CSS styles #388
Comments
It should be working as-is because remote CSS is not blocked by default. Can you please attach a sample message (which I can feed into my Mailpit) to test? Thanks. |
This is a test message I am making. I noticed that this error appears in the browser console, it could be the issue. I am currently using Laravel 8.x and PHP 7.4.33 from Laragon, as shown in the image. I did one last test, now in MailHog, and it works correctly when viewing the HTML. |
Bug confirmed - leave this with me! |
Thanks for reporting this bug - it's actually been broken for several months so I'm surprised nobody reported it earlier! The fix has been fixed in v1.21.4. Please let me know if it is working again for you? Thanks. |
I ran two tests using version |
Perfect, thanks for testing and the quick confirmation! Regarding using external stylesheets (in general), please note that external CSS files is not the recommended approach as popular web clients like Gmail do not support it. And of those that do, most do not support modern CSS like bootstrap (so some features may not work). If you're going to be using it, then keep in mind that there will be a significant portion of users who will not have any styling applied. I'll close this issue now. Thanks again for reporting it! |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [axllent/mailpit](https://github.com/axllent/mailpit) | minor | `v1.20.7` -> `v1.21.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>axllent/mailpit (axllent/mailpit)</summary> ### [`v1.21.4`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1214) [Compare Source](axllent/mailpit@v1.21.3...v1.21.4) ##### Bugfix - Fix external CSS stylesheet loading in HTML preview ([#​388](axllent/mailpit#388)) ### [`v1.21.3`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1213) [Compare Source](axllent/mailpit@v1.21.2...v1.21.3) ##### Chore - Update Go dependencies - Minor UI tweaks - Mute Dart Sass deprecation notices - Update node dependencies - Upgrade Alpine packages on Docker build - Add swagger examples & API code restructure ### [`v1.21.2`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1212) [Compare Source](axllent/mailpit@v1.21.1...v1.21.2) ##### Feature - Add additional ignored flags to sendmail ([#​384](axllent/mailpit#384)) ##### Chore - Remove legacy Tags column from message DB table - Update Go dependencies - Update node dependencies ##### Fix - Fix browser notification request on Edge ([#​89](axllent/mailpit#89)) ### [`v1.21.1`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1211) [Compare Source](axllent/mailpit@v1.21.0...v1.21.1) ##### Feature - Add ability to search by size smaller or larger than a value (eg: `larger:1M` / `smaller:2.5M`) - Add ability to search for messages containing inline images (`has:inline`) ##### Chore - Update Go dependencies - Separate attachments and inline images in download nav and badges ([#​379](axllent/mailpit#379)) ### [`v1.21.0`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1210) [Compare Source](axllent/mailpit@v1.20.7...v1.21.0) ##### Feature - Experimental Unix socket support for HTTPD & SMTPD ([#​373](axllent/mailpit#373)) ##### Fix - Allow multiple item selection on macOS with Cmd-click ([#​378](axllent/mailpit#378)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Error : importing external CSS styles
I am working with HTML and Bootstrap v5 to send an email and display Bootstrap v5 CSS styles, but
mailpit
cannot load the Bootstrap styles correctly. The same issue occurs with emails sent from Laravel.In the HTML Source tab, I can see the code in more detail, but in the HTML tab, the Bootstrap 5 styles are not applied correctly. I have tried adding the --block-remote-css-and-fonts flag as per the official documentation to fix the issue, but the problem persists.
This is the tab: HTML Source
This is the tab: HTML Source
This is the expected result:
The text was updated successfully, but these errors were encountered: