Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knrdl/rest2smtp
Send mails via REST API
https://github.com/knrdl/rest2smtp
api mail mailer openapi rest rest-api rust smtp smtps starttls swagger tls
Last synced: 6 days ago
JSON representation
Send mails via REST API
- Host: GitHub
- URL: https://github.com/knrdl/rest2smtp
- Owner: knrdl
- License: mit
- Created: 2022-06-05T19:00:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T21:17:00.000Z (24 days ago)
- Last Synced: 2024-10-22T16:36:52.949Z (24 days ago)
- Topics: api, mail, mailer, openapi, rest, rest-api, rust, smtp, smtps, starttls, swagger, tls
- Language: Rust
- Homepage:
- Size: 206 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rest2smtp
Send mails via REST API
API Documentation is served by the program under the root path (`/`).
It's also available [here](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/knrdl/rest2smtp/main/www/openapi.yaml#/mail/sendmail).## Config
| Env Var | Description |
|-----------------|---------------------------------------------------------------------------------------------------------------------|
| SMTP_HOST | Hostname (required) |
| SMTP_PORT | (default depends on encryption method) |
| SMTP_ENCRYPTION | `TLS` (default), `STARTTLS`, `UNENCRYPTED` (insecure) |
| SMTP_USERNAME | (optional) |
| SMTP_PASSWORD | (optional) |
| API_DOC_INFO | Custom text (or html) to be displayed in API documentation header. Defaults to "Send mails via REST API" (optional) |## Deployment
Docker Compose / Swarm
```yaml
version: '3.9'services:
rest2smtp:
image: knrdl/rest2smtp # or alternative: ghcr.io/knrdl/rest2smtp
hostname: rest2smtp
environment:
SMTP_HOST: smtp.example.org # replace this
ports:
- "80:80"
```## Development
```shell
# in project root dir
podman run -it --rm -v "$PWD:$PWD" -w "$PWD" -p8080:80 --env-file env docker.io/library/rust
$ cargo run
```