开发 HTML 电子邮件通讯,刷新 Apple Mail
我正在使用 PHP 和 PHP 开发 HTML 新闻通讯系统。 梨。 它发送电子邮件很好。
但是我无法强制 Apple Mail 从服务器重新加载图像。 我已经尝试过:
- 重新启动邮件
- 清除 ~/Library/MailDownloads
- 清除 ~/Library/Cache/Mail
- 清空 Safari 缓存
有人知道 Apple Mail 缓存图像的位置吗?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以选择向所有图像 URL 添加虚拟查询字符串吗?
您只需更新查询字符串即可防止使用缓存的图像。
Is adding a dummy query string to all image URLs an option for you?
You'd simply update the query string to prevent the cached image from being used.
您可以使用 OnyX 清除所有应用程序缓存并调整操作系统的其他方面。
You could use OnyX to clear all apps cache and also tune up other aspects of the OS.
我刚刚遇到这个问题,并能够通过退出邮件并删除来解决它:
〜/ Library / Caches / com.apple.mail / Cache.db
I just encountered this problem, and was able to solve it by quitting Mail and deleting:
~/Library/Caches/com.apple.mail/Cache.db
使用最新的 FSeventer 程序,我将缓存文件跟踪到:
/private/var/folders/Sl/rand chars+++TM/-Caches-/com.apple.mail/Cache.db
我尝试关闭互联网连接,删除文件,然后查看 HTML 新闻通讯。 没有加载图像。 重新连接并查看 HTML 邮件后,Cache.db 文件大小增加到 1MB。
似乎还有另一个中间缓存。 我尝试删除缓存& 在查看两个不同的时事通讯时断开连接。 他们都表现得很好。 当我退出并重新打开邮件后,它们的图像没有显示。
所以删除缓存是可以的,但是我还没有找到强制刷新图像的方法。
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.
我今天花了一些时间研究这个问题,并且能够轻松地重现该问题。 邮件中的图像不会改变 - 无论您在服务器上更改图像多少次,当您第一次查看电子邮件时显示的图片似乎都会保留在该消息中。 即使我将消息转发给自己,它也不会重新加载图片。 哇。 我也无法在任何缓存中找到图像。
我确实找到了去年夏天对这个同样问题的参考没有真正的答案。 一个人同意 Leandro Ardissone 的回答,并建议使用 OnyX 来“破坏应用程序缓存”,但这只是一次性修复。
Ates Goral 建议的“虚拟查询字符串”对我来说非常有用,因此,如果您可以在每次更改图片时处理更改,这似乎是您最好的选择。
希望我能提供更多帮助,但我很困惑。
我认为我们需要 Apple Mail 小组的人员来启发我们找到真正的解决方案!
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!