简体   繁体   English

让Gmail自动显示我嵌入HTML电子邮件中的图片?

[英]Make Gmail automatically show images I embed in my HTML email?

I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. 我正在使用Zend_Mail在PHP中构建HTML电子邮件,我想以这样的方式嵌入/附加/删除某些图像,以便Gmail在不提示用户的情况下自动显示它们。 How can I do this? 我怎样才能做到这一点?

Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain: 谷歌的批量发件人指南说,Gmail会自动为已验证其域名的发件人显示图片:

To ensure that Gmail can identify you: 确保Gmail可以识别您的身份:

  • Use a consistent IP address to send bulk mail. 使用一致的IP地址发送批量邮件。
  • Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain. 为您发送邮件的IP地址保留有效的反向DNS记录,指向您的域。
  • Use the same address in the 'From:' header on every bulk mail you send. 在您发送的每封邮件的“发件人:”标题中使用相同的地址。

We also recommend publishing an SPF record, and signing with DKIM or DomainKeys. 我们还建议发布SPF记录,并使用DKIM或DomainKeys进行签名。

By authenticating, inline images you send will be shown automatically. 通过身份验证,您发送的内嵌图像将自动显示。 Recipients will not need to click the "Display images below" link. 收件人无需点击“在下方显示图片”链接。

Google offers a page to learn more about email authentication . Google提供了一个页面,详细了解电子邮件身份验证

You can't without the user approving your imagery. 您无法在没有用户批准您的图像的情况下使用。 It's an anti-spam/ anti-tracking technique that has to be off by default to work. 这是一种反垃圾邮件/反跟踪技术,默认情况下必须关闭才能工作。

You can make Gmail display images (embedded into content) with authenticating emails sent. 您可以通过验证发送的电子邮件使Gmail显示图像(嵌入到内容中)。 You just make sure you have a correct SPF record, and 1024 bit DKIM signed the message. 您只需确保您有正确的SPF记录,并且1024位DKIM对该消息进行了签名。 Then gmail shows embedded images within content. 然后gmail在内容中显示嵌入的图像。

As of my knowledge, This is not possible. 据我所知,这是不可能的。 Gmaill will hide the images initially. Gmaill最初会隐藏图像。 If the Use enables (by clicking " Always display images from XXXXXX website "), then it will be available from next time onwards 如果使用启用(通过单击“ Always display images from XXXXXX website ”),则可从下次开始使用

You can always show images if you use Base 64. That way images are embedded as code in the code and aren't coming from anyone else's server, so there is no tracking risk. 如果使用Base 64,您可以随时显示图像。这样,图像作为代码嵌入代码中,而不是来自其他任何人的服务器,因此没有跟踪风险。 Just google how to embed an image as Base 64 and that will solve your issue completely. 只需谷歌如何嵌入图像作为Base 64,这将完全解决您的问题。

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

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