{"id":15870869,"url":"https://github.com/int128/ses-to-slack","last_synced_at":"2026-04-28T20:06:12.440Z","repository":{"id":138193807,"uuid":"111888121","full_name":"int128/ses-to-slack","owner":"int128","description":"Lambda function to forward mails from AWS SES to Slack/Mattermost","archived":false,"fork":false,"pushed_at":"2020-07-04T12:09:32.000Z","size":12,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T14:39:27.603Z","etag":null,"topics":["aws-lambda","aws-ses","javascript","mattermost","serverless","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-24T07:18:00.000Z","updated_at":"2020-08-20T22:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0622a69e-73d0-42f8-bf56-e988053e3dfb","html_url":"https://github.com/int128/ses-to-slack","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"4349b382f9d0eb7db845476e96a1751109b0153e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fses-to-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fses-to-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fses-to-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fses-to-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/ses-to-slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246719589,"owners_count":20822771,"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","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":["aws-lambda","aws-ses","javascript","mattermost","serverless","slack"],"created_at":"2024-10-06T00:40:37.829Z","updated_at":"2026-04-28T20:06:12.379Z","avatar_url":"https://github.com/int128.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SES to Slack\n\nThis is an AWS Lambda function to forward mails from SES to Slack, based on the Serverless framework.\n\n\n## How it works\n\n```\nMail Server\n↓ SMTP\nAWS SES\n↓ Publish\nAWS SNS\n↓ Subscribe\nAWS Lambda\n↓ HTTP(S)\nSlack Incoming Webhook\n```\n\n\n## Getting Started\n\nDeploy a Lambda function.\n\n```sh\n# Setup credentials\nnpm run serverless -- config credentials -p aws -k IAM_KEY -s IAM_SECRET\n\n# Deploy\nnpm install\nnpm run deploy\n```\n\nOpen the AWS Management Console and do following steps:\n\n1. Open Lambda and Check ARN of the function, like `arn:aws:lambda:ap-northeast-1:***:function:ses-to-slack-dev-handle`.\n1. Add an environment variable on the function:\n    - `WEBHOOK`: URL of Slack Incoming Webhook (Mandatory)\n    - `WEBHOOK_USERNAME`: Username for Incoming Webhook request (Optional)\n    - `WEBHOOK_ICON_EMOJI`: Icon for Incoming Webhook request (Optional)\n    - `WEBHOOK_HOST_HEADER`: Host header for Incoming Webhook request (Optional)\n1. Open SNS and create a topic.\n1. Create a subscription on the topic:\n    - Protocol: AWS Lambda.\n    - Endpoint: ARN of the Lambda function.\n1. Open SES and make sure your domain has been verified.\n1. Create a rule set with the following action:\n    - SNS topic: ARN of the SNS topic.\n    - Encoding: UTF-8\n\n\n## Sending to Mattermost\n\nMattermost is a Slack alternative. You can send mails to a Mattermost channel as well.\n\n1. Create an Incoming Webhook on a Mattermost team.\n1. Set the `WEBHOOK` environment variable.\n\nIf the instance is protected by the security group, you can send mails via VPC.\nFor example,\n\n```\nMail Server\n↓ SMTP\nAWS SES\n↓ Publish\nAWS SNS\n↓ Subscribe\nAWS Lambda\n↓ ENI\n↓ VPC\n↓ ENI\nAWS EC2\n```\n\nIf a reverse proxy exists and requires `Host` header, you can specify the `WEBHOOK_HOST_HEADER` environment variable.\n\n\n## Caveat\n\nSNS can receive mails that are 150kB or less. Larger mails will bounce.\n\n\n## Contributions\n\nFeel free to open an issue or pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fses-to-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Fses-to-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fses-to-slack/lists"}