{"id":17312718,"url":"https://github.com/matthiasmullie/post-to-email","last_synced_at":"2025-04-14T14:11:50.452Z","repository":{"id":62525244,"uuid":"470729583","full_name":"matthiasmullie/post-to-email","owner":"matthiasmullie","description":"Supporting contact forms for static websites","archived":false,"fork":false,"pushed_at":"2024-05-29T06:29:01.000Z","size":530,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T03:11:30.198Z","etag":null,"topics":["contact","docker","email","forms","post","smtp","static"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/matthiasmullie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["matthiasmullie"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-03-16T19:45:44.000Z","updated_at":"2025-02-06T11:07:30.000Z","dependencies_parsed_at":"2024-11-14T12:02:29.332Z","dependency_job_id":null,"html_url":"https://github.com/matthiasmullie/post-to-email","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasmullie%2Fpost-to-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasmullie%2Fpost-to-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasmullie%2Fpost-to-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasmullie%2Fpost-to-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthiasmullie","download_url":"https://codeload.github.com/matthiasmullie/post-to-email/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894938,"owners_count":21179152,"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":["contact","docker","email","forms","post","smtp","static"],"created_at":"2024-10-15T12:44:25.132Z","updated_at":"2025-04-14T14:11:50.398Z","avatar_url":"https://github.com/matthiasmullie.png","language":"PHP","funding_links":["https://github.com/sponsors/matthiasmullie"],"categories":[],"sub_categories":[],"readme":"# Post to email\n\n![Image by fullvector on Freepik](instructions/assets/logo.png)\n\n\n## Contact forms for static websites\n\nHere's a solution for those with static websites wanting a contact form, but find themselves in a situation where they can't provide a script to support it (e.g. your platform doesn't allow you to host such script, or you simply don't know how)\n\nThis project provides a simple endpoint to submit your forms to, turning those form fields into an email to you.\n\nAll you need is:\n\n- An SMTP server, for outgoing mails (e.g. [Gmail](https://support.google.com/mail/answer/7126229?hl=en#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client) or [Outlook](https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-8361e398-8af4-4e97-b147-6c6c4ac95353))\n- A platform that supports deploying Docker containers (e.g. [render](instructions/1-paas.md))\n- Your static website with a form, hosted anywhere\n\nFor your convenience, this project is wrapped into a Docker container that can easily be deployed on any Paas - some of which will allow you to deploy this for free.\nRead on!\n\n\n## Instructions\n\n### 1. Deploy the container\n\nRun the `matthiasmullie/post-to-email` Docker container in whatever [configuration](#configuration) makes sense.\n\nBelow are detailed instructions to run this in a couple of different ways - pick whichever makes most sense for your use-case:\n\n- [Deploy it on a PaaS](instructions/1-paas.md)\n- [Run it with Docker](instructions/1-docker.md)\n- [Run it with Docker Compose](instructions/1-docker-compose.md)\n- [Clone the repo and build it yourself](instructions/1-byo.md)\n\n\n### 2. Build a simple form \u0026 submit it\n\nSubmit a POST request (with remaining variables - see [configuration](#configuration))\n\nCheck out [this simple example to build a form that submits forms](instructions/2-form.md) to the service we deployed in the first step.\n\nAnd here's [information about mitigating spam](instructions/2-spam.md) in case you were worried about that!\n\n\n### 3. Receive email\n\nYou've got this! We're done here.\n\n\n## Configuration\n\nEmail configuration can be set globally on the server hosting this script (via environment variables), or per request on the client calling this (via POST or GET params)\n\nIf set, environment variables always get precedence over POST, which gets precedence over GET params.\nThis can be useful to lock down certain settings (e.g. `RECIPIENT` or `DSN`) within your hosting environment to prevent abuse.\n\nAvailable params:\n\n* `ALLOW_ORIGIN` **[ENV only]**: allowed CORS domain\n* `DSN` **[ENV only]**: DSN string for a transport (e.g. SMTP) to send emails with\n* `SENDER`: sender email address\n* `RECIPIENT`: recipient email address\n* `REPLY_TO` *(optional, defaults to `SENDER`)*: reply-to email address\n* `SUBJECT` *(optional, defaults to \"Form to email\")*: email subject\n* `REDIRECT` *(optional, defaults to referrer)*: location to redirect back to after handing submission, or explicitly blank for no redirect\n* `HONEYPOT` *(optional, defaults to none)*: Name of a form field to use as [honeypot](instructions/2-spam-honeypot.md) to filter out [unwanted (spam) submissions](instructions/2-spam.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasmullie%2Fpost-to-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthiasmullie%2Fpost-to-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasmullie%2Fpost-to-email/lists"}