{"id":17696846,"url":"https://github.com/datashaman/serverless-mailer","last_synced_at":"2025-03-31T00:40:54.581Z","repository":{"id":66709873,"uuid":"150947811","full_name":"datashaman/serverless-mailer","owner":"datashaman","description":"Serverless mailer written in Flask, uses Mailgun to deliver contact emails.","archived":false,"fork":false,"pushed_at":"2018-09-30T15:16:28.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T05:43:46.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datashaman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-09-30T08:28:23.000Z","updated_at":"2018-10-01T07:22:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"25c836e6-3e3f-4efe-9931-79be0cb16c35","html_url":"https://github.com/datashaman/serverless-mailer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fserverless-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fserverless-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fserverless-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fserverless-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datashaman","download_url":"https://codeload.github.com/datashaman/serverless-mailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399800,"owners_count":20770907,"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":[],"created_at":"2024-10-24T14:45:30.477Z","updated_at":"2025-03-31T00:40:54.561Z","avatar_url":"https://github.com/datashaman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Mailer\n\nServerless mailer written in Flask, uses Mailgun to deliver contact emails.\n\n## Requirements\n\n- AWS account.\n- AWS CLI with configured credentials.\n- Serverless CLI.\n- Mailgun account.\n\n## Form Parameters\n\nThe endpoint expects a POST with the following required form parameters:\n\n- name - The name of the sender.\n- email - The email of the sender.\n- message - The message sent by the sender.\n- redirect - The URL to redirect to after sending the email.\n\n## AWS Lambda deployment\n\nDefine required parameters in Systems Manager Parameter Store:\n\n    aws ssm put-parameter --name mailerTo --type String --value admin@example.com\n    aws ssm put-parameter --name mailgunDomain --type String --value mailer.example.com\n    aws ssm put-parameter --name mailgunKey --type String --value key-12345678901234567890\n\nOptional parameters:\n\n    aws ssm put-parameter --name mailerSubject --type String --value 'Website contact!'\n\nTo enable support for reCAPTCHA (recommended):\n\n    aws ssm put-parameter --name recaptchaEnabled --type String --value true\n    aws ssm put-parameter --name recaptchaSecretKey --type String --value 1234567890bcdefghijkl\n\nTo deploy to AWS Lambda:\n\n    sls plugin install -n serverless-python-requirements\n    sls plugin install -n serverless-wsgi\n    sls deploy\n\nThe parameters are used at _deploy time_. If you make a change to any of the parameters, you must redeploy the function.\n\nIf you have not defined the _mailerSubject_ parameter, you will see a warning during deploy which can be ignored.\n\n## Local development\n\nSetup some environment variables:\n\n    cp .env.example .env\n    vim .env (or nano .env)\n\nSetup Python virtual environment:\n\n    mkvirtualenv -r requirements.txt serverless-mailer\n\nRun server:\n\n    python app.py\n\n## Example Form\n\nAn example HTML form is included to test your implementation. It requires you to setup some parameters in _parameters.json_:\n\n    cp parameters.json.example parameters.json\n\nreCAPTCHA must be hosted on a site, the easiest way to serve the folder for local testing is:\n\n    python3 -m http.server\n\nAnd open (http://localhost:8000/example.html) with your browser.\n\n_NB_: Make sure that the _recaptchaEnabled_ flag matches in _.env_ and _parameters.json_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Fserverless-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatashaman%2Fserverless-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Fserverless-mailer/lists"}