https://github.com/lbgm/mail-with-php
PHP simple dockerized app to send mail. You can use it as docker-compose service
https://github.com/lbgm/mail-with-php
docker docker-compose docker-image mailer php
Last synced: about 2 months ago
JSON representation
PHP simple dockerized app to send mail. You can use it as docker-compose service
- Host: GitHub
- URL: https://github.com/lbgm/mail-with-php
- Owner: lbgm
- License: gpl-3.0
- Created: 2022-10-03T09:34:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-03T13:33:46.000Z (over 3 years ago)
- Last Synced: 2025-01-07T22:13:41.681Z (over 1 year ago)
- Topics: docker, docker-compose, docker-image, mailer, php
- Language: PHP
- Homepage:
- Size: 115 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mail-with-php
Php simple dockerized app to send mail. You can use it as docker-compose service with Node JS project and more.
It uses PHPMailer (https://github.com/PHPMailer/PHPMailer)
## build example
```sh
docker build -t lbgm/mailer -f Dockerfile ./ --build-arg MAIL_SERVER=mail.example.com --build-arg MAIL_PORT=465 --build-arg MAIL_SECURE=ssl --build-arg MAIL_ACCOUNT=noreply@example.com --build-arg MAIL_ACCOUNT_PASSWORD=password --build-arg FROM_MAIL=noreply@example.com --build-arg SMTP_DEBUG=4
```
## Request payload
make http post request on `http://:port/send-mail/`;
response codes: `200/201` on **success** end `403` when **failed**
```json
{
"title": "it work lbgm !",
"to_mail": "hi.balthazar@icloud.com",
"to_name": "Balthazar DOSSOU",
"message": "Hi Balthazar, your mail-with-php docker app work well !",
"from_name": "Mail With PHP"
}
```