简体   繁体   English

HTML电子邮件图像可以在Outlook中正常工作,但不能在Outlook.com中正常工作

[英]HTML Email Images working fine in Outlook but not in Outlook.com

I am using PHP to send a HTML newsletter email and I am having problems with the images in the email. 我正在使用PHP发送HTML时事通讯电子邮件,并且电子邮件中的图像存在问题。 In Outlook 2013 the images display perfectly fine but in Outlook.com some of the images do not display. 在Outlook 2013中,图像显示完美,但在Outlook.com中则不显示某些图像。

In the email there are two images: one is the logo and the other is the profile picture of the user. 电子邮件中有两张图片:一个是徽标,另一个是用户的个人资料图片。 The URL for the logo is http://70.39.151.44/~ramsay6/leadsheet/resources/leadsheet_logo.png and it does not work. 徽标的URL是http://70.39.151.44/~ramsay6/leadsheet/resources/leadsheet_logo.png ,它不起作用。

The funny part is when the profile picture URL is http://cdn.icons8.com/storage/iOS7/PNG/50/Users/user_male-50.png (remote site) the picture displays, but when the URL is http://70.39.151.44/~ramsay6/leadsheet/accountimg/1-ramsay.png it does not display. 有趣的是,当个人资料图片URL为http://cdn.icons8.com/storage/iOS7/PNG/50/Users/user_male-50.png (远程站点)时,图片将显示,但URL为http://70.39.151.44/~ramsay6/leadsheet/accountimg/1-ramsay.png不会显示。

Outlook.com uses a proxy to access the pictures. Outlook.com使用代理访问图片。 Could the URL of my website be causing the error? 我网站的网址是否可能导致错误?

Looks like it! 看起来像它! Webmail clients have tough security restrictions- that's why they don't allow linked CSS sheets or JS. Webmail客户端具有严格的安全性限制-这就是为什么它们不允许链接的CSS表或JS。 It's also why GMail strips your <style> tag. 这也是GMail剥离<style>标记的原因。

Looks like you need to host your images from a registered domain or else Outlook.com finds them risky and ignores them. 看来您需要托管来自已注册域的图像,否则Outlook.com会发现它们具有风险,并会忽略它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM