Small self-hosted PHP contact form endpoint as a drop-in for static websites. It supports DNSBL and rate limitiing.
Requires PHP >= 7.3
- Clone this repository
git clone https://github.com/vwochnik/php-mail.git
- CD into the directory
cd php-mail
- Run composer
composer install
-
Copy
example.config.php
toconfig.php
and insert SMTP configuration there. -
Upload to your webserver such that public is inside document root.
POST /mail/
Content-Type: application/json
{
"name": "Example",
"email": "example@example.com",
"subject": "Test",
"message": "Hello World!"
}
MIT