{"id":16082155,"url":"https://github.com/varunon9/amp4email","last_synced_at":"2026-02-09T10:02:13.926Z","repository":{"id":51407630,"uuid":"179804533","full_name":"varunon9/amp4email","owner":"varunon9","description":"How to send dynamic email to users- Everything you need to know","archived":false,"fork":false,"pushed_at":"2022-12-10T20:53:02.000Z","size":2177,"stargazers_count":13,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T11:44:49.686Z","etag":null,"topics":["amp","amp-gmail","amp4email","dynamic-email-send"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/varunon9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-06T07:53:57.000Z","updated_at":"2023-01-30T11:59:08.000Z","dependencies_parsed_at":"2023-01-26T11:02:05.323Z","dependency_job_id":null,"html_url":"https://github.com/varunon9/amp4email","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/varunon9/amp4email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varunon9%2Famp4email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varunon9%2Famp4email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varunon9%2Famp4email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varunon9%2Famp4email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varunon9","download_url":"https://codeload.github.com/varunon9/amp4email/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varunon9%2Famp4email/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267400736,"owners_count":24081189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amp","amp-gmail","amp4email","dynamic-email-send"],"created_at":"2024-10-09T11:26:06.998Z","updated_at":"2026-02-09T10:02:13.872Z","avatar_url":"https://github.com/varunon9.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amp4email aka ⚡4email\n\nRecently Google rolled out amp4email support in Gmail. This tutorial provides a step by step guide on how to send dynamic email to end users.\n\n### What is dynamic email?\n\n**Official documentation**: The AMPHTML Email format provides a subset of AMP components that you can use in email messages. Recipients of AMP emails can view and interact with the AMP components directly in the email.\n\nIn layman's term this means that you can send interactive email with real-time dynamic content, e.g. you can make your users fill a form and save response right in their inbox without clicking on any link.\n\n## Lets get started\n\n### Step 1: Setting up this project\n\n1. Clone/Download this repo- `git clone https://github.com/varunon9/amp4email.git`\n2. Install dependencies `yarn install`\n3. Create `config.js` file from `configStructure.js` file or just rename it to `config.js`\n\n### Step 2: Configure sender details\n\n1. Edit your gmail accoint details in `config.js` file (created in step 1)\n2. Make sure that you have enabled less secure settings to your gmail account details (you can disable it after testing)\n3. Visit https://myaccount.google.com/lesssecureapps?utm_source=google-account\u0026utm_medium=web for enabling less secure apps settings\n\n### Step3: Enabling dynamic email on receiver's gmail account\n\n1. You must enable dynamic email settings on receiver's gmail account.\n2. Whitelist your (sender) gmail account in receiver's Gmail Settings \u003e General \u003e Dynamic email \u003e Dynamic email development\n\n\n### Step4: Run the application\n\n1. `yarn start`\n2. Enter following url to browser `http://localhost:3500/send/?email=\u003cyour@email.com\u003e`\n3. `your@email.com` should get one dynamic email\n\n\n### Complete Youtube demo\n\nPlease visit https://youtu.be/1SMjRAOlLl4\n\n\n### Dynamic email received\n\n![Dynamic email received](./images/dynamic-email-demo.gif)\n\n\n## What's next?\n\nThis was simple POC for dynamic email using [nodemailer](https://github.com/nodemailer/nodemailer) v6.1.0. In your production environment you might want to perform these steps-\n\n1. Configure your email notification engine to have support for dynamic email. Basically you need to add a new MIME part with a content type of `text/x-amp-html` as a descendant of `multipart/alternative`. It should live alongside the existing `text/html` or `text/plain` parts. Refer: https://www.ampproject.org/docs/interaction_dynamic/amp-email-format\n\n2. Construct valid amp4email document to send in email. You can use https://amp.gmail.dev/playground/ to validate it. To test dynamic email from this playground, you need to whitelist  `amp@gmail.dev` in *Gmail Settings \u003e General \u003e Dynamic email \u003e Dynamic email development*. Alternatively you can whitelist one of your own production email e.g. `info@example.com` and test it.\n\n![Dynamic email development](https://image.prntscr.com/image/j7Qw7El2ToWpO6RqGB85bQ.png)\n\n3. If you use free gmail accounts, you might have to wait for dynamic email settings to be available in your Gmail settings because Gmail is gradually rolling out this feature. If you organisation use G-Suite then your admin can enable these settings from `Apps \u003e G Suite \u003e Settings for Gmail \u003e User Settings`\n\n![Dynamic email development](./images/g-suite-enable-dynamic-email.gif)\n\n4. Once you test dynamic email, next step would be sending it to end users. For that you need to whitelist your domain to Google. You will have to send a real world dynamic email to `ampforemail.whitelisting@gmail.com` meeting all the guidelines. Refer: https://developers.google.com/gmail/ampemail/register\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarunon9%2Famp4email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarunon9%2Famp4email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarunon9%2Famp4email/lists"}