Action button not showing when sending to other gmail account
Asked Answered
M

1

6

My ViewAction button is working fine when using the Apps Script to send the email to myself. (Same gmail account as logged in)

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

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

When setting another gmail account as recipient, the action button won't display. I've tried several gmail accounts.

By the look of it, testing schemas is currently only possible when sending to one self and not to other gmail accounts. Is this true?

My action button:

<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>

Working Headers:

Delivered-To: [email protected]
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]
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]>
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]
To: [email protected]
Content-Type: multipart/alternative; boundary=001a11c3e1827e3fef04e3d040f5

Not working headers:

Delivered-To: [email protected]
Received: by 10.76.9.231 with SMTP id d7csp139739oab;
        Tue, 13 Aug 2013 01:44:49 -0700 (PDT)
Return-Path: <[email protected]>
Received-SPF: pass (google.com: domain of [email protected] 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] designates 10.236.38.106 as permitted sender) [email protected];
       dkim=pass [email protected]
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]>
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]
To: [email protected]
Content-Type: multipart/alternative; boundary=089e01184c56f4944004e3d040e8
Milner answered 13/8, 2013 at 8:59 Comment(3)
1.Your email address must be white list by google. Use this link to register and white list email address: docs.google.com/a/google.com/forms/d/e/…Farman
@mark-lowe Did you end up filling the form at Google? How long did it took before they respond? Was the answer positive or did you have troubles making it work with them in the end?Wiltonwiltsey
Sending mails to myself for testing worked. Never went further than testing with this.Milner
T
17

Your sender address needs to be whitelisted to send actions to other users:

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

For testing purposes, when sending emails to yourself the whitelisting requirements are ignored.

Topflight answered 14/8, 2013 at 6:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.