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
Fully support newsletter templates #6193
Labels
Comments
leofeyer
added
feature
up for discussion
Issues and PRs which will be discussed in our monthly Mumble calls.
labels
Jul 6, 2023
leofeyer
removed
the
up for discussion
Issues and PRs which will be discussed in our monthly Mumble calls.
label
Jul 6, 2023
why would that not already work if you adjust the |
Because the inline styles need to be applied to the mail body (aka the RTE output) as well. |
leofeyer
added a commit
that referenced
this issue
Jan 2, 2024
Description ----------- Implements #6193 I have added a `mail_responsive` template that is based on https://github.com/tijsverkoyen/CssToInlineStyles and can be used as a starting point for own templates. Here is how it looks: ### Back end ![](https://github.com/contao/contao/assets/1192057/a5ce06c8-db36-40a8-bf57-efc462a789d4) ### Inbox preview with preheader text <img src="https://github.com/contao/contao/assets/1192057/a5f5c9f4-3fd6-42c8-8cec-daa676a235d0" width="375" height="72" alt=""> ### Message in Apple Mail ![](https://github.com/contao/contao/assets/1192057/ef53e9d3-fbd1-4286-adcf-23ad1dbaa6fa) Commits ------- 6da9a7a Inline the CSS from a newsletter template before sending 40ef527 Fix the max length of the `preheader` field f2dacc0 Show the preheader in the newsletter preview cb87bde Update the mail_responsive template
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
I want to make using more complex newsletter templates such as this, this or this more convenient. To accomplish that, we have to convert the CSS code to inline styles when rendering the template. Luckily, there is a library already:
https://github.com/tijsverkoyen/CssToInlineStyles
So ideally, the process would be something like this:
mail_custom.html5
template.<?= $this->body ?>
placeholder and the CSS definitions to format the content.CssToInlineStyles
class.The mail should then be compatible with most mail clients and can use modern layouts with e.g. two columns or alike.
The text was updated successfully, but these errors were encountered: