Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skn0tt/railmail
A Reactive Mail dispatcher written in F#.
https://github.com/skn0tt/railmail
amqp fsharp mail rabbitmq reactive
Last synced: 23 days ago
JSON representation
A Reactive Mail dispatcher written in F#.
- Host: GitHub
- URL: https://github.com/skn0tt/railmail
- Owner: Skn0tt
- Created: 2018-07-17T06:57:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:32:11.000Z (about 1 year ago)
- Last Synced: 2024-10-06T04:03:25.256Z (4 months ago)
- Topics: amqp, fsharp, mail, rabbitmq, reactive
- Language: F#
- Size: 73.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RailMail
> Etymology: (*Reactive Mail* -> Rail) + Mail, just for the rhymes.
RailMail is a Reactive Mail dispatcher written in F#.
It takes Mail requests from AMQP/RabbitMQ and a REST API.
Dispatch happens over SMTP.- [Blog Post](https://simonknott.de/articles/fsharp-railmail)
## API
Envelope information is transmitted in the following JSON format:
```json
{
"recipients": "[email protected]",
"subject": "Funky Mail Dispatcher!",
"body": {
"text": "Hey Flo, I found that great service called RailMail! Check it out!",
"html": "Hey Flo, ... "
}
}
```
This JSON is sent either to the specified AMQP Queue or POSTed to the REST Endpoint "/mail".```sh
curl \
-X POST \
--data '{ "recipient": ... }' \
http://railmail:5000/mail
```## Configuration
| Env | Default | Needed |
| ------------- | --------------- | ------ |
| SMTP_HOST | | x |
| SMTP_PORT | 587 | |
| SMTP_USERNAME | | x |
| SMTP_PASSWORD | | x |
| SMTP_SENDER | | x |
| AMQP_HOST | | x |
| AMQP_PORT | 5672 | |
| AMQP_USERNAME | | x |
| AMQP_PASSWORD | | x |
| AMQP_QUEUE | RAILMAIL_INGEST | |Railmail's standard port is `5000`.
## Build and test the application
### Windows
Run the `build.bat` script in order to restore, build and test (if you've selected to include tests) the application:
```
> ./build.bat
```### Linux/macOS
Run the `build.sh` script in order to restore, build and test (if you've selected to include tests) the application:
```
$ ./build.sh
```## Run the application
After a successful build you can start the web application by executing the following command in your terminal:
```
dotnet run src/RailMail
```After the application has started visit [http://localhost:5000](http://localhost:5000) in your preferred browser.