I'm wondering if there is some functionality I can use to create dynamic content based on the time of day when an email is opened. I looked at the ampscript now() function, but it pulls the time that the email is sent, not the time the email is being opened/viewed.

The only other option I can think of is live images, but I believe that is an extra cost, and I was hoping the dynamic content would be text, not an image.


2 Answers 2


If you are looking for something simple and quick, you can accomplish this inside of SFMC, but you would need to host it on a Cloudpage/Landing Page.

  1. First you would need to set the content type (via META) to image. <META HTTP-EQUIV="Content-Type" CONTENT="image/png">
  2. Next you would create a Conditional Statement via IF ELSE to display the correct image. e.g. %%[IF DATEPART(NOW(), 'hour') == 5 THEN]%% image html %%[ENDIF]%%
  3. Inside each condition, you would then have the image HTML you wish displayed. e.g. <img src="yourimagepath.png">
  4. Inside the email, you would set the dynamic image url to the url of the page you created in the above steps. e.g. <img src="http://www.yourcloudpage.com" />

Please note that it will cost you a 'ping' against your Cloudpage views every time that someone loads this image, meaning every single open in your send will cost you money.

As an alternative you can host this on a 3rd party server and utilize PHP or a similar server side language to push the image up. This would be a more cost effective solution for you if possible.

Finally, if this is going to be a long term need with large volumes and complexity, it definitely is better to go with a service such as LiveClicker as mentioned by @iManage.


  1. Host on 3rd party server and use ServerSide code to push approrpriate image - requires development.
  2. Host on SFMC Cloudpages using AMPScript - but costs money each view and requires development
  3. Use a service such as LiveClicker as mentioned by @iManage. But high upfront cost as well as recurring fee.

Ampscript only executes at time of send - it's ServerSide scripting.

For your requirements where you want to change the image in the inbox of a customer then you would need to use Live Images or another tool like LiveClicker

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .