Skip to content

Instantly share code, notes, and snippets.

@patrickcoombe
Last active April 26, 2019 18:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save patrickcoombe/95fab4af30995557fa97 to your computer and use it in GitHub Desktop.
Save patrickcoombe/95fab4af30995557fa97 to your computer and use it in GitHub Desktop.
JSON-LD markup for rich email messages
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type": "EmailMessage",
"description": "View this Pull Request on GitHub",
"action": {
"@type": "ViewAction",
"url":"https://github.com/perma-id/w3id.org/pull/47",
"name":"View Pull Request"
}
}
</script
@dcworldwide
Copy link

dcworldwide commented Jan 1, 2017

How to include your organisation / brand as the sender? I've been trying to brand my emails without success (i.e. company name and icon).

I've tried setting multiple props as follows..


                            <script type="application/ld+json">
                            {
                                "@context": "http://schema.org",
                                "@type": "EmailMessage",
                                "description": "Test!",
                                "image": "https://apiant.com/appResources/icons_large/shopify.png",
                                "thumbnailUrl": "https://apiant.com/appResources/icons_large/shopify.png",
                                "sender": {
                                    "@type": "Organization",
                                    "name": "name",
                                    "logo": "https://apiant.com/appResources/icons_large/shopify.png",
                                    "brand":   {
                                        "name": "name"
                                    }
                                }
                            }
                            </script>
                   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment