Developing HTML email newsletter, refreshing Apple Mail
Asked Answered
I

5

5

I'm developing an HTML newsletter system using PHP & PEAR. It sends out the emails fine.

However I cannot force Apple Mail to reload images from the server. I have tried:

  • Restarting Mail
  • Clear ~/Library/MailDownloads
  • Clear ~/Library/Cache/Mail
  • Empty Safari cache

Does any one know where Apple Mail caches the images ?

Interjacent answered 16/12, 2008 at 12:40 Comment(1)
What version of Apple Mail are you using?Fregger
I
1

Using the latest FSeventer program I traced the cache file to:

/private/var/folders/Sl/rand chars+++TM/-Caches-/com.apple.mail/Cache.db

I tried turning of internet connection, deleting the file, and then viewing the HTML newsletters. No images loaded. After re-connecting and viewing the HTML mail the Cache.db file grew to 1MB in size.

There seems to be another intermediary cache. I tried deleting the cache & disconnectinf whilst viewing two different newsletters. They bothy displayed properly. After I quit and re-opened Mail, they images did not display.

So it is possible to delete the cache, but I have not found a way to force refresh the images.

Interjacent answered 1/2, 2009 at 22:57 Comment(0)
R
3

Is adding a dummy query string to all image URLs an option for you?

<img src="http://example.com/images/hello.png?343882881923"/>

You'd simply update the query string to prevent the cached image from being used.

Repast answered 27/1, 2009 at 21:53 Comment(1)
yes that is possible, but surely I can 'empty the cache' or 'force a reload'. Your suggestion is a valid word-around, but not an answer. When I get a chance I will try using fseventer to find where the files are stored.Interjacent
F
2

You could use OnyX to clear all apps cache and also tune up other aspects of the OS.

Forenoon answered 16/12, 2008 at 23:14 Comment(1)
to me this seems like using a sledge hammer to open a nut. (Onyx is a fine program, but not really the answer.)Interjacent
A
2

I just encountered this problem, and was able to solve it by quitting Mail and deleting:

~/Library/Caches/com.apple.mail/Cache.db

Ataliah answered 27/9, 2010 at 8:53 Comment(0)
I
1

Using the latest FSeventer program I traced the cache file to:

/private/var/folders/Sl/rand chars+++TM/-Caches-/com.apple.mail/Cache.db

I tried turning of internet connection, deleting the file, and then viewing the HTML newsletters. No images loaded. After re-connecting and viewing the HTML mail the Cache.db file grew to 1MB in size.

There seems to be another intermediary cache. I tried deleting the cache & disconnectinf whilst viewing two different newsletters. They bothy displayed properly. After I quit and re-opened Mail, they images did not display.

So it is possible to delete the cache, but I have not found a way to force refresh the images.

Interjacent answered 1/2, 2009 at 22:57 Comment(0)
C
0

I spent some time playing with this today and was able to duplicate the problem easily. The image in mail doesn't change - whichever picture shows when you first look at the email seems to stay with that message no matter how many times you change the image on the server. Even when I forward the message to myself it doesn't reload the picture. Wow. And I couldn't find the images anywhere in any cache, either.

I did find a reference from last summer to this same problem with no real answer. One person agreed with Leandro Ardissone's answer and recommends using OnyX to "trash the Application Cache", but it's only a one time fix.

The "dummy query string" suggested by Ates Goral worked great for me, so if you can deal with changing that every time you change the picture that seems to be your best bet.

Wish I could be more help, but I'm stumped.

I think we need someone from the Apple Mail group to enlighten us to a real fix!

Causerie answered 29/1, 2009 at 3:47 Comment(1)
Hi, when I get a chance I will use fseventer to see what is happening in the background.Interjacent

© 2022 - 2024 — McMap. All rights reserved.