如何在gmail收件箱预览中显示图像

时间:2018-07-29 09:21:26

标签: email gmail

我一直在收到带有图片和主题行的促销电子邮件。我只在Gmail中看到过。 不是表情符号,而是收件箱预览中主题行部分正下方的图像预览 电子邮件对此更具吸引力。我已经检查了一段时间的谷歌,看看这个功能叫什么,但找不到相同的任何线索。 对此的任何信息,将不胜感激。

2 个答案:

答案 0 :(得分:1)

Gmail Promotion Annotation 自2018年以来,实际上,您可以通过在电子邮件头部使用JSON-LD标记在Gmail中添加带有预览的图像。 Gmail促销标签可以显示:

  • 徽标
  • 图片
  • 主题
  • 带有日期框架的交易徽章
  • 徽章设计中的折扣代码

到目前为止,自定义设置非常严格,但下面的代码段中对Google指南进行了注释:

<script type="application/ld+json">
 [{
   "@context": "http://schema.org/",
   "@type": "Organization",

   // WARNING: Before sending email, either point the logo
   // at your own image or delete the logo annotation.
   //
   // If showing a logo, we recommend using an https URL.
   // It's not a requirement today, but may be in the future.
   "logo": "https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png"
  },{
   "@context": "http://schema.org/",
   "@type": "EmailMessage",

   // Use this optional alternative subject line to avoid duplicate text
   // between the subject, deal badge, and discount code.
   "subjectLine": "[Important] Please add subject line in annotation"
  },{
   "@context": "http://schema.org/",
   "@type": "DiscountOffer",

   // Describe your discount, this will be shown as a badge (eg "25% off" or "free 
      shipping")
   "description": "20% off",

   "discountCode": "PROMO",
   "availabilityStarts": "2019-07-21T03:42:38-07:00",
   "availabilityEnds": "2019-07-24T03:42:38-07:00"
  },{
   // Promotion card with single image.
   // We recommend using an https URL.  It's not a requirement today, but may be in 
       the future.
   // Any image size will work and will just be cropped automatically.
   // GIF & WEBP images are not supported and will be filtered out.
   // Sample image is 538x138, 3.9 aspect ratio
    "@context": "http://schema.org/",
    "@type": "PromotionCard",
    "image": "https://www.google.com/gmail-for-marketers/promo-tab/markup- 
     tool/sample.png"
 }]
</script>

此答案的资源可以在Google开发者文档中找到: Promotion Tab Documentation

答案 1 :(得分:0)

向每个GridView行添加一个事件onmouseover = FuntionName(),并显示将包含消息的弹出窗口。但是要从客户端获取