GithubHelp home page GithubHelp logo

jonathannen / semantic-email-tester Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 11 KB

Generates a Google Apps Script that can generate JSON-LD "Semantic" emails.

License: MIT License

JavaScript 100.00%

semantic-email-tester's Introduction

Test Your Semantic Markup

In my blog I was musing on the use of JSON-LD "Semantic" Email and the potential for email bots. But I wanted to try out some semantic emails for myself.

Being able to view semantic snippests in GMail is one of it's most touted features. You can see a list of their supported JSON-LD markup at: https://developers.google.com/gmail/markup/reference/

Amazing stuff. But. It's surprisingly hard to test for yourself. Firstly, you need an email account with DKIM and SPF correctly configured. Even then, you need to be whitelisted by Google.

There is an option of sending emails to yourself to bypass this. However, I found sending via GMail SMTP wasn't enough. For some reason this doesn't include valid DKIM and SPF, surprisingly. The next option was to authenticate via the API, but that was a bunch of plumbing I didn't want to do (and would be a pain for others to replicate).

So my last resort was to generate all the combinations I needed and then turn into a Google Apps Script. Right now it's shared as a Google Apps Scripts "Web App". Take a look at Semantic Email Tester.

The only snag with is it gives my script permissions to run as you. Specifically send emails as you. If you'd rather run yourself it's easy. Take code.gs directly and head on over to https://script.google.com. Paste it in and run the sendSemanticEmailTests function.

Instructions

This is just a generator.

$ node index.js > code.gs

This re-generates the code.gs file, which is already checked in to this repo.

If you head over to https://script.google.com you'll be able to use this code.gs file to run the scripts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.