Sign inSign up

skn0tt/railmail

By skn0tt

•Updated almost 8 years ago

A Reactive Mail dispatcher written in F#.

Image
0

10K+

skn0tt/railmail repository overview

⁠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.

⁠API

Envelope information is transmitted in the following JSON format:

{
  "recipients": "[email protected]",
  "subject": "Funky Mail Dispatcher!",
  "body": {
    "text": "Hey Flo, I found that great service called RailMail! Check it out!",
    "html": "Hey <b>Flo</b>, ... "
  }
}

This JSON is sent either to the specified AMQP Queue or POSTed to the REST Endpoint "/mail".

curl \
  -X POST \
  --data '{ "recipient": ... }' \
  http://railmail:5000/mail

⁠Configuration

EnvDefaultNeeded
SMTP_HOSTx
SMTP_PORT587
SMTP_USERNAMEx
SMTP_PASSWORDx
SMTP_SENDERx
AMQP_HOSTx
AMQP_PORT5672
AMQP_USERNAMEx
AMQP_PASSWORD x
AMQP_QUEUERAILMAIL_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⁠ in your preferred browser.

Tag summary

Content type

Image

Digest

Size

103.8 MB

Last updated

almost 8 years ago

docker pull skn0tt/railmail