https://github.com/eexit/http2smtp
📩 An API that forwards HTTP-backed vendor mailer calls to an SMTP catcher
https://github.com/eexit/http2smtp
bridge docker docker-container golang golang-application http-server mailcatcher-api mailhog mit-license smtp-client smtp-mail sparkpost-developers
Last synced: 3 months ago
JSON representation
📩 An API that forwards HTTP-backed vendor mailer calls to an SMTP catcher
- Host: GitHub
- URL: https://github.com/eexit/http2smtp
- Owner: eexit
- License: mit
- Created: 2020-12-29T23:56:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T12:49:36.000Z (about 2 years ago)
- Last Synced: 2025-01-30T17:30:07.755Z (3 months ago)
- Topics: bridge, docker, docker-container, golang, golang-application, http-server, mailcatcher-api, mailhog, mit-license, smtp-client, smtp-mail, sparkpost-developers
- Language: Go
- Homepage:
- Size: 7.23 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 📩 HTTP to SMTP
[](https://github.com/eexit/http2smtp/actions) [](https://codecov.io/gh/eexit/http2smtp) [](https://github.com/eexit/http2smtp/releases) [](https://github.com/eexit/http2smtp/blob/master/LICENSE)An API that forwards HTTP-backed vendor mailer calls to SMTP.
Plug a [MailHog](https://github.com/mailhog/MailHog) or [MailCatcher](https://mailcatcher.me/) to API email sending vendors such as [SparkPost](https://www.sparkpost.com/), [Mailgun](https://www.mailgun.com/) or [SendGrid](https://sendgrid.com/) for testing purposes.
#### Features
- :white_check_mark: 100% code coverage
- :whale: Light Docker image available
- :zap: AWS Lambda Function 3-commands deployment## Usage
See [examples](examples).
:zap: ProTip: for tracing purposes, this app kinda supports [W3C Trace Context recommendation](https://www.w3.org/TR/trace-context/). Configure the env var `TRACEPARENT_HEADER` and inject any trace into this header value. All log entries will be contextualized with the given value.
### Docker image [](https://hub.docker.com/repository/docker/eexit/http2smtp) [](https://hub.docker.com/repository/docker/eexit/http2smtp)
1. Checkout this repo or only copy the `.env.dist` and `docker-compose.yml` files
1. Rename `.env.dist` into `.env`
1. Optional: update the values accordingly
1. Pull images and run `docker-compose up http2smtp`### AWS Lambda Function 
:zap: This project is also shipped for an AWS Lambda Function-ready. Check out the [README](cmd/http2smtp-lambda).
## Vendors
### [SparkPost](https://developers.sparkpost.com/api/)
POST /sparkpost/api/v1/transmissions
SparkPost supports either [inline](https://developers.sparkpost.com/api/transmissions/#transmissions-post-send-inline-content) or [RFC 822 transmissions](https://developers.sparkpost.com/api/transmissions/#transmissions-post-send-rfc822-content). For now, only the latter one is supported.
Basic validation is enforced, only the recipients list email and the RFC 822 content are used and mandatory.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contributors
[](https://github.com/eexit/http2smtp/graphs/contributors)