No description
- PHP 100%
| .env.example.ini | ||
| .gitignore | ||
| index.php | ||
| README.md | ||
PHP SMTP Form
A tiny PHP form that sends the textarea contents to a fixed recipient from .env.
Setup
- Copy
.env.exampleto.env. - Fill in the SMTP server, login, sender, and
MAIL_TOaddress. - Run the app:
php -S localhost:8000
Then open http://localhost:8000.
Environment Values
SMTP_HOST: SMTP server hostname.SMTP_PORT: Usually587for STARTTLS or465for SSL.SMTP_SECURE: Usetls,ssl, ornone.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.