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

[WIP] Add cid image attachment support in template #10 #14

Merged

Conversation

stephane-klein
Copy link
Owner

Add cid image attachment support in template #10

@stephane-klein
Copy link
Owner Author

@Its-Alex I don't understand why mjml2html( don't parse and convert to html this syntax: <mj-image width='100px' src="cid:gibbon.png"></mj-image>?

The mjml2html result contain this code:

<mj-image width='100px' src="/v1/templates/confirm_email/attachments/gibbon.png"></mj-image>

and not :

<img='100px' src="/v1/templates/confirm_email/attachments/gibbon.png" />

I think that it is the good syntax: https://mjml.io/documentation/#mjml-image 🤔

@stephane-klein
Copy link
Owner Author

I found my mistake mj-image is in mj-text!

        <mj-text>    
          <p>Hi {{ username }}!</p>

          <p>Thanks for signing up for {{ application_name }}!</p>

          <mj-image width='100px' src="cid:gibbon.png"></mj-image>

          <p>Please confirm your email ({{ confirm_email|safe }}) by clicking the link below:</p>
        </mj-text>

Good syntax:

        <mj-text>    
          <p>Hi {{ username }}!</p>

          <p>Thanks for signing up for {{ application_name }}!</p>
        </mj-text>    

        <mj-image width='100px' src="cid:gibbon.png"></mj-image>

        <mj-text>    
          <p>Please confirm your email ({{ confirm_email|safe }}) by clicking the link below:</p>
        </mj-text>

@stephane-klein stephane-klein force-pushed the 10-add-cid-image-attachment-support-in-template branch from 7232c20 to 473a767 Compare April 13, 2020 20:18
@stephane-klein stephane-klein force-pushed the 10-add-cid-image-attachment-support-in-template branch from 473a767 to 8833860 Compare April 13, 2020 20:21
@stephane-klein
Copy link
Owner Author

stephane-klein commented Apr 13, 2020

Feature implementation is done.

Note: there is a bug with Mailhog attachment (maybe that) but all works perfectly with Gmail.

@stephane-klein stephane-klein merged commit 81f4bb9 into master Apr 13, 2020
This pull request was closed.
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

Successfully merging this pull request may close these issues.

1 participant