Google Schema button not showing up when testing

只谈情不闲聊 提交于 2019-12-08 06:51:15

问题


I'm testing my schema button by sending to myself (I am overriding the "From" email header address with my gmail address to test from the server that sends the email). Both recipient and sender are my gmail email address.

The schema shows up when I view the original email, but I don't see any buttons in my inbox.

Here is the script tag I am sending as part of my HTML email template:

<script type="application/ld+json">
{
    "@context": "schema.org",
    "@type": "EmailMessage",
    "description": "User invited you to a test1.",
    "action": {
        "@type": "ConfirmAction",
        "name": "Accept",
        "handler": {
            "@type": "HttpActionHandler",
            "url": "http://localhost/?id=xxx"
        }
    }
}
</script>

Here is a screenshot of my inbox -- notice there is no "Accept" Gmail Action anywhere:

Here is a screenshot of the email itself, also not "Accept Gmail Action anywhere:


回答1:


You need the sender to be your own email address and your emails to be signed with DKIM or SPF in order for Gmail to render the action. It seems like you are trying to "fake" your email address which is exactly what we need to prevent.



来源:https://stackoverflow.com/questions/16659819/google-schema-button-not-showing-up-when-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!