dawidd6 / action-send-mail

:gear: A GitHub Action to send an email to multiple recipients
MIT License
455 stars 188 forks source link

Send index.html with multiple dependent references like html js, fonts, css, images #158

Closed sanjeevjangra closed 1 year ago

sanjeevjangra commented 1 year ago

Sending the index.html file works but dependent references which are another html files along with css, fonts and images are not working? Or I need to something different to make it work?

dawidd6 commented 1 year ago

put them in attachments input

jasonm23 commented 1 year ago

Do not put them in attachments.

Place what you can into the index.html as part of <head> (<style> and <script> tags.), images should be base64 encoded and added using the data: protocol.

Fonts can also be included this way.

However, as general advice, don't treat email HTML as you would web HTML, most email clients will mangle it anyway, and the art of composing HTML for emails is pretty different.

You can use tools like https://stripo.email/ to create HTML email (I don't specifically recommend this tool, I do recommend doing research and learning the specifics of HTML email.)

dawidd6 commented 1 year ago

No response. Closing. Thanks @jasonm23 for some enlightenment :smile: