https://github.com/patlux/smtp2http
Forwards incoming mails to a provided http rest endpoint
https://github.com/patlux/smtp2http
Last synced: 3 months ago
JSON representation
Forwards incoming mails to a provided http rest endpoint
- Host: GitHub
- URL: https://github.com/patlux/smtp2http
- Owner: patlux
- Created: 2023-12-10T12:46:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-13T20:28:19.000Z (over 1 year ago)
- Last Synced: 2025-03-07T01:47:20.282Z (3 months ago)
- Language: Rust
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# smtp2http
A simple program which opens a smtp server and sends the incomings mails to your configured REST endpoint as POST request.
```mermaid
flowchart LR
incoming-mail-->smtp;
smtp-->smtp2http;
smtp2http-->http;
```## Getting Started
```sh
git clone https://github.com/patlux/smtp2http.git
cd smtp2http
cargo run --release# Starts the smtp server on port 25
# Sends all incoming mails as POST to http://localhost:1337/mail
sudo ./target/release/smtp2http server 127.0.0.1:25 http://localhost:1337/mail# You can send a test mail to test if it's working
./target/release/smtp2http send-test-mail smtp://127.0.0.1:25# Your web server at http://localhost:1337/mail
# should received a incoming POST request
```## POST Data
The following data is sent to your configured REST endpoint.
```json
{
"subject": "",
"html": "",
"text": ""
}
```