No description
Find a file
2026-07-02 04:25:44 +02:00
.env.example.ini initial commit 2026-07-02 04:25:44 +02:00
.gitignore initial commit 2026-07-02 04:25:44 +02:00
index.php initial commit 2026-07-02 04:25:44 +02:00
README.md initial commit 2026-07-02 04:25:44 +02:00

PHP SMTP Form

A tiny PHP form that sends the textarea contents to a fixed recipient from .env.

Setup

  1. Copy .env.example to .env.
  2. Fill in the SMTP server, login, sender, and MAIL_TO address.
  3. Run the app:
php -S localhost:8000

Then open http://localhost:8000.

Environment Values

  • SMTP_HOST: SMTP server hostname.
  • SMTP_PORT: Usually 587 for STARTTLS or 465 for SSL.
  • SMTP_SECURE: Use tls, ssl, or none.
  • SMTP_USERNAME: SMTP username.
  • SMTP_PASSWORD: SMTP password.
  • SMTP_FROM: Sender email address.
  • SMTP_FROM_NAME: Optional display name for the sender.
  • MAIL_TO: Fixed recipient address.
  • MAIL_SUBJECT: Optional email subject.