Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 1 month ago
JSON representation

PHP simple dockerized app to send mail. You can use it as docker-compose service

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 [email protected] --build-arg MAIL_ACCOUNT_PASSWORD=password --build-arg [email protected] --build-arg SMTP_DEBUG=4
```

## Request payload
make http post request on http://yout_image_name_or_localhost:port/send-mail/
response codes: 200/201 on success end 403 on failed

```json
{
"title": "it work lbgm !",
"to_mail": "b*****@gmail.com",
"to_name": "Balthazar DOSSOU",
"message": "Hi Balthazar, your mail-with-php docker app work well !",
"from_name": "Mail With PHP"
}
```

image