发送到其他 Gmail 帐户时不显示操作按钮

2024-06-21

使用 Apps 脚本向自己发送电子邮件时,我的 ViewAction 按钮工作正常。 (与登录时相同的 Gmail 帐户)

function testSchemas() {
  var htmlBody = HtmlService.createHtmlOutputFromFile('mail_template').getContent();

  MailApp.sendEmail({
    to: "[email protected] /cdn-cgi/l/email-protection",
    subject: 'Test Actions in the Inbox - ' + new Date(),
    htmlBody: htmlBody    
  });
}

将另一个 Gmail 帐户设置为收件人时,不会显示操作按钮。我已经尝试了几个 Gmail 帐户。

从表面上看,目前只有在发送给自己而不是其他 Gmail 帐户时才可以测试架构。这是真的?

我的操作按钮:

<html>
  <head>
    <script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "action": {
    "@type": "ViewAction",
    "name": "Test Action",
    "url": "https://mydomain.com/test"
  },
  "description": "Test action"
}
</script>
</head>
<body>
    <p>
      This a test for a Go-To action in Gmail.
    </p>
</body>
</html>

工作标题:

Delivered-To: [email protected] /cdn-cgi/l/email-protection
Received: by 10.112.167.104 with SMTP id zn8csp127915lbb;
        Tue, 13 Aug 2013 01:44:42 -0700 (PDT)
Return-Path: <3-fEJUhEJAJoG4LE.FIQ8.M6BQ8CTAG4CF.6IG@maestro.bounces.google.com>
Received-SPF: pass (google.com: domain of 3-fEJUhEJAJoG4LE.FIQ8.M6BQ8CTAG4CF.6IG@maestro.bounces.google.com designates 10.224.2.202 as permitted sender) client-ip=10.224.2.202
Authentication-Results: mr.google.com;
       spf=pass (google.com: domain of 3-fEJUhEJAJoG4LE.FIQ8.M6BQ8CTAG4CF.6IG@maestro.bounces.google.com designates 10.224.2.202 as permitted sender) smtp.mail=3-fEJUhEJAJoG4LE.FIQ8.M6BQ8CTAG4CF.6IG@maestro.bounces.google.com;
       dkim=pass [email protected] /cdn-cgi/l/email-protection
X-Received: from mr.google.com ([10.224.2.202])
        by 10.224.2.202 with SMTP id 10mr4378787qak.8.1376383481951 (num_hops = 1);
        Tue, 13 Aug 2013 01:44:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:message-id:date:subject:from:to:content-type;
        bh=YNbTe5hF82u8UBHoyJqTFWAtXaO3n1xZ0aL3mDu5ycM=;
        b=DAjFv8v0ScIjF0VY1Ec1rtGmfvJ5WAem5TQmyhYt2b24B3fmYy2VEuvScnX4id+4Pi
         D48Uq8DE2Qoj+N18HZRY+tVnyYdJATrlNfe6FCrQK2Ktue79ox/im5t7lrI5C6WZvXlm
         TppcL8bOtFoX7y2FE011kGn0vmFSMOWPNbrynbexRJTyafWJrRzhJ6Z8oXfDfdYaY9fG
         OALcOrMwUd6+KXAZGj5qJhZ/hUEIC5KbaXYwonJoaFDJkZ2zPkV2DHAzY78vLOzcD37g
         zg43n1rify+udKSvlY9oRnHmAwsu+Sb4ddQ8jtJBQRpw8+MoV9zRKhQgLUdvZU/nmmb4
         c8OQ==
MIME-Version: 1.0
X-Received: by 10.224.2.202 with SMTP id 10mr3639307qak.8.1376383481552; Tue,
 13 Aug 2013 01:44:41 -0700 (PDT)
Message-ID: <[email protected] /cdn-cgi/l/email-protection>
Date: Tue, 13 Aug 2013 08:44:41 +0000
Subject: Test Actions in the Inbox - Tue Aug 13 2013 10:44:41 GMT+0200 (CEST)
From: [email protected] /cdn-cgi/l/email-protection
To: [email protected] /cdn-cgi/l/email-protection
Content-Type: multipart/alternative; boundary=001a11c3e1827e3fef04e3d040f5

不工作的标题:

Delivered-To: [email protected] /cdn-cgi/l/email-protection
Received: by 10.76.9.231 with SMTP id d7csp139739oab;
        Tue, 13 Aug 2013 01:44:49 -0700 (PDT)
Return-Path: <[email protected] /cdn-cgi/l/email-protection>
Received-SPF: pass (google.com: domain of [email protected] /cdn-cgi/l/email-protection designates 10.236.38.106 as permitted sender) client-ip=10.236.38.106
Authentication-Results: mr.google.com;
       spf=pass (google.com: domain of [email protected] /cdn-cgi/l/email-protection designates 10.236.38.106 as permitted sender) [email protected] /cdn-cgi/l/email-protection;
       dkim=pass [email protected] /cdn-cgi/l/email-protection
X-Received: from mr.google.com ([10.236.38.106])
        by 10.236.38.106 with SMTP id z70mr1926602yha.29.1376383489428 (num_hops = 1);
        Tue, 13 Aug 2013 01:44:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:message-id:date:subject:from:to:content-type;
        bh=0ZsOg3hkpKeRGvrg8ym5j4ArBI++UJSNWp46KyrSIsU=;
        b=faCKadLjkifGzASnhw5FkjbOmo+brPDsEnzZuP5EmhzRxUzBoM2+7IM2oYTEvDDk7V
         Ib51o8EJ2g3sxP1yo6F+xdaldOcFZ65x3HiZn35hzyagzYHq/ASD/IJJb7rxQmYbmNM9
         zEMe71JAI1h/Wh9DJUG1vA7+AF83ApJwkeFZWOSRSKDBPAcOTZ7bIe2ymxJgp8mOq7mz
         /BLDtPPOoq4XZ5aeapEFUvMSpKCKkA/l5hlNk7Tnhv/EuEKl0RK7xYrnIXgtaFKgpRJ4
         hkaP+EaQNrFdj3WtvBNVeFl1VFcgHYu3padPKbkWTTBuCljICvot67ru6oX9IqrqGA8O
         bayA==
MIME-Version: 1.0
X-Received: by 10.236.38.106 with SMTP id z70mr1246078yha.29.1376383489312;
 Tue, 13 Aug 2013 01:44:49 -0700 (PDT)
Message-ID: <[email protected] /cdn-cgi/l/email-protection>
Date: Tue, 13 Aug 2013 08:44:49 +0000
Subject: Test Actions in the Inbox - Tue Aug 13 2013 10:44:49 GMT+0200 (CEST)
From: [email protected] /cdn-cgi/l/email-protection
To: [email protected] /cdn-cgi/l/email-protection
Content-Type: multipart/alternative; boundary=089e01184c56f4944004e3d040e8

您的发件人地址需要列入白名单才能向其他用户发送操作:

https://developers.google.com/gmail/schemas/registering-with-google https://developers.google.com/gmail/schemas/registering-with-google

出于测试目的,当向自己发送电子邮件时,白名单要求将被忽略。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

发送到其他 Gmail 帐户时不显示操作按钮 的相关文章

  • 研究缓冲区溢出时应该使用哪些版本的 GCC 或标志?

    最近 作为计算机工程专业的本科生 我一直在研究缓冲区溢出 出于兴趣 我开始研究缓冲区溢出 但在尝试在我的计算机上用 GCC 4 9 1 在 Debian Jessie 中 编译的我自己的 C 程序中实现它们时遇到了困难 我听说较新的编译器中
  • 作为应用函子(Haskell / LYAH)

    第11章向你学习 Haskell引入以下定义 instance Applicative gt r where pure x gt x f lt gt g x gt f x g x 在这里 作者进行了一些不寻常的挥手 的实例实现有点神秘 所以
  • SSL 与 Ruby on Rails

    我需要做什么才能让我的 Ruby on Rails 应用程序获得使用 https 的流量 我安装了证书 如果我在访问网站时在地址栏中手动输入 https 则会出现小锁图标 但只需在浏览器中手动访问 www example app com 即
  • 用于绘制音符的库[关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我正在寻找一个可以以某种方式在屏幕上绘制音符的 Windows 库 我将使用它用 C 编写一个应用程序
  • Tensorflow:ValueError:形状必须具有相同的等级,但为 0 和 2

    我在乘以 x1 Wo1 时遇到形状错误 但我找不到原因 错误 ValueError 形状必须具有相同的等级 但为 0 和 2将形状 0 与其他形状合并 对于 add 2 x 操作 Pack 输入形状 20 1 import tensorfl
  • 循环检查文本框是否不为空

    我试着For循环遍历表单上的所有控件以检查 TextBox 是否为空 然后将焦点放在第一个空文本框上 我的 Excel VBA 表单有 34 个文本框 现在它有一个嵌套的If检查所有文本框是否不为空的函数 如果还有空的 SetFocus第一
  • 在 sqlplus 中执行 plsql 时将错误消息重定向到日志文件

    在 sqlplus 中执行 PL SQL 程序时 需要一种将 PL SQL 程序错误消息重定向到日志文件的方法 假设 PL SQL 程序名为send 2012 sql它有以下异常块 EXCEPTION WHEN NO DATA FOUND
  • 无法调用 Node.js 中 ES6 定义的类中的方法 [重复]

    这个问题在这里已经有答案了 我正在使用 Node js Express js 和 MongoDB 制作一个应用程序 我正在使用 MVC 模式 并且还有单独的路由文件 我正在尝试创建一个控制器类 其中一个方法调用其中声明的另一个方法 但我似乎
  • 循环内的 JavaScript 闭包 – 简单的实际示例

    var funcs let s create 3 functions for var i 0 i lt 3 i and store them in funcs funcs i function each should log its val

随机推荐