{"id":25633153,"url":"https://github.com/simonfelding/amazon-lambda-nodemailer-webhook","last_synced_at":"2026-07-06T05:31:55.496Z","repository":{"id":185623862,"uuid":"463303575","full_name":"simonfelding/amazon-lambda-nodemailer-webhook","owner":"simonfelding","description":"middy.js webhook that receives json and sends an email. ","archived":false,"fork":false,"pushed_at":"2022-03-07T18:21:44.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T21:30:16.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonfelding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-02-24T21:14:26.000Z","updated_at":"2022-02-25T12:03:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"cecb9678-8729-4662-acaf-5770fea05829","html_url":"https://github.com/simonfelding/amazon-lambda-nodemailer-webhook","commit_stats":null,"previous_names":["simonfelding/amazon-lambda-nodemailer-webhook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonfelding/amazon-lambda-nodemailer-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonfelding%2Famazon-lambda-nodemailer-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonfelding%2Famazon-lambda-nodemailer-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonfelding%2Famazon-lambda-nodemailer-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonfelding%2Famazon-lambda-nodemailer-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonfelding","download_url":"https://codeload.github.com/simonfelding/amazon-lambda-nodemailer-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonfelding%2Famazon-lambda-nodemailer-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35179683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"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":[],"created_at":"2025-02-22T21:28:04.431Z","updated_at":"2026-07-06T05:31:55.479Z","avatar_url":"https://github.com/simonfelding.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# setup\n`docker build -t protonmail-webhook .`\n\n## invoke webhook\nThe server is easily modified, but currently expects json in the format of:\n```\nbody:\n\tname:\n\tcpr:\n\tmail:\n\ttext:\n```\nMake sure to examine the docker-compose.yml for important environment settings.\nAlso make sure to edit the inputSchema in server.js so it fits your purpose and modify the below curl string accordingly.\n\n`curl -XPOST \"http://webhook:8080/2015-03-31/functions/function/invocations\" -d '{\"body\": {\"name\":\"a\",\"cpr\":\"12345678-1234\",\"mail\":\"a@b.dk\",\"text\":\"hello world! 123 123 123 123 123 12\"}}' -H 'Content-Type: application/json'`\n\n# optional weird self-hosted lambda server setup\nuse docker compose and add the container with container_name: \"webhook\". Add the following to nginx server block. the weird path is necessary for the AWS lambda container to work. \n```\n\tlocation /mailhook {\n                proxy_pass http://webhook:8080/2015-03-31/functions/function/invocations;\n                proxy_buffering off;\n        }\n```\n\n# test\n`curl -XPOST \"https://example.com/mailhook\" -d '{\"body\": {\"name\":\"a\",\"cpr\":\"12345678-1234\",\"mail\":\"a@b.dk\",\"text\":\"hello world! 123 123 123 123 123 12\"}}' -H 'Content-Type: application/json'`\n\n# Advice\nDon't actually store the password in the docker-compose.yml file. It's probably a bad idea for deployment (but fine if you're just testing, env variables can be securely set in the aws lambda control panel).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonfelding%2Famazon-lambda-nodemailer-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonfelding%2Famazon-lambda-nodemailer-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonfelding%2Famazon-lambda-nodemailer-webhook/lists"}