ChrisRAoW / mautic-rss-to-email-bundle

Mautic plugin to send emails from RSS
103 stars 22 forks source link

Will it work with MJML? #77

Open GeorgBNM opened 8 months ago

GeorgBNM commented 8 months ago

Actually trying, to get it working with MJML. Otherwise, the output will not be consistent on all email-programs.

Any clue about?

ChrisRAoW commented 8 months ago

To be honest, I didn't tested with MJML / GrapeJS builder. Did you already tried it? If you encountered issues, can you share what you stumbled upon?

GeorgBNM commented 8 months ago

Hi Chris,

Thanks for your message.

It will only work within the MJML markup, for instance:

<mj-text>

{feed url="<<FEEDURL>>"}
    {feeditems}
        <h3>{feeditem:title}</h3>
        <p><small>{feeditem:date format="d-m-Y H:i"}</small></p>
        <p>{feeditem:description}</p>
        <p><img src="{feeditem:image}"></p>
    {/feeditems}
{/feed}

</mj-text>

But not in this way (needed):

<mj-column>

{feed url="<<FEEDURL>>"}
    {feeditems}
        <mj-text>{feeditem:title}</mj-text>
        <mj-text><small>{feeditem:date format="d-m-Y H:i"}</small></mj-text>
        <mj-text>{feeditem:description}</mj-text>
        <mj-image width="100px" src="{feeditem:image}"></mj-image>

    {/feeditems}
{/feed}

</mj-column>

This will not be processed.

Any clue about that? Escaping with <mj-raw></mj-raw> didn't work either.

Thank you!

Best, Georg

ChrisRAoW commented 8 months ago

@GeorgBNM I'm not really familiar with MJML, so sorry if I'm asking silly questions ;-) But why not put the mj-text within the mj-column?

GeorgBNM commented 8 months ago

Sorry, for late reply.

Tried this out. Does not work.

Always, if some elements are within mj elements, they will not be rendered.

<mj-image width="100px" src="{feeditem:image}"></mj-image>

This will not work.

Maybe you've another idea?

Thanks 🙏

ChrisRAoW commented 8 months ago

@ChrisRAoW I will try to find some time soon to figure this out

GeorgBNM commented 8 months ago

@ChrisRAoW Your help is very appreciated.