Is there a way to embed an iframe in an email with text that updates?
Asked Answered
C

4

13

I want to embed an iframe inside an email that contains the 10 most recent chat messages. Is there a way to make this iframe dynamic so that it always shows the latest 10 chats regardless of when the email is opened? If the iframe is not the correct way to do this, is there a better way?

Calipee answered 30/1, 2016 at 6:39 Comment(2)
I recommend to read some results of following search bing.com/search?q=email+beacon to understand what you are trying to do and consider if you want to continue that route. (The answer is NO by the way, but that is not likely what you want to hear, so not really making it as answer)Unpracticed
To emphasize what @AlexeiLevenkov said: many email clients will refuse to render remote content since it might be an email beacon or something worse (which is to say: this is a security concern!). Therefore, the content won't render reliably. If a link is too much to ask, perhaps you should consider an RSS feed or social media (internal or external).Nationalist
C
23

You can implement an iframe into the email - but your mail will be recognized as spam by many providers.

You should try to render your content dynamically into an image and implement that image into the email.

Conciliatory answered 7/2, 2016 at 13:18 Comment(2)
For the latter purpose, headless crome or Puppeteer are extremely useful.Pacha
Wouldn't the cache be a problem?Aulea
J
4

There kind of is a solution. It is using Dynamic CSS with a fallback of a Dynamic image to pull the information. It is not elegant really as for some clients (e.g. Outlook) this is not available at all and will only display initial information. It also utilizes a link for a style sheet which also severely limits which clients this will work in.

The fall back dynamic image is a bit more comprehensive in client support, but much harder to maintain as you will need to build something that programatically pulls the tweets (HTML webpage potentially) and then also have something that creates and hosts an image for the email to pull. This is not a short, simple thing to set up and may not be worth the required back end work for a simple email.

See this link for a bit more in-depth info on how this can be done for adding a live twitter feed into an email: https://litmus.com/blog/how-to-code-a-live-dynamic-twitter-feed-in-html-email

Josuejosy answered 1/2, 2016 at 13:15 Comment(0)
A
1

Since there was no accepted answer i thought i would give my input as well.

Litmus had done something similar for their live twitter feed in emails sometime ago.

The method i can think off is to create a PHP page which takes 10 images and makes it into 1. PHP can have a loop that checks for increments from a specific number and if it exists then add to that 1 image. When there is a new chat image added, PHP will disregard the last one and add the new in the loop.

Ark answered 30/4, 2017 at 2:54 Comment(0)
A
-1

For anyone reading this in 2022, this is possible with AMP. Instead of an iframe, you can create a dynamic email easily. check out amp.dev

Note: AMP is not supported by many email clients

Aloin answered 16/9, 2022 at 14:0 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Epiphany

© 2022 - 2024 — McMap. All rights reserved.