|Keith Irwin 4bb76aa4a1|
This is a PGP-enabled contact form that you can use. It has two parts:
- An API which sends the message by email
Setting up a server
Download the source; it's not on docker hub.
git clone https://gitea.gf4.pw/ki9/mailapi.git cd mailapi
Copy the sample environment files and edit them to suit your needs.
cp .env.sample .env cp docker-compose.yml.sample docker-compose.yml
Start the service with docker:
docker-compose up -d
...or start the service directly, or with a daemon manager:
npm run start
The API should now be listening on port 8080 or whatever you set in the
docker-compose.yml. You may choose to run this through a proxy server or whatever.
Serving the clientside app
You can use the contact form in
index.html.sample. Tweak it to your needs and put it in your clientside code. I'm not offering support for your particular set up, but the code in both
index.js is short and easy to modify to your use case.
Copyright © 2021 Keith Irwin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.