GitXplorerGitXplorer
S

RailMail

public
2 stars
0 forks
1 issues

Commits

List of commits on branch master.
Verified
9021151445c2d61766db3b401bc1cc1d02ca3783

Update README.md

SSkn0tt committed 6 years ago
Unverified
0d07718af7b82d163a46325cb634f5f99a3a34e3

v0.3.0

SSkn0tt committed 6 years ago
Unverified
8b4486cdf0f044f9bff8cb6d755b04814fc847fa

Enable sending to multiple recipients

SSkn0tt committed 6 years ago
Unverified
31f1437bea835ca293724f2b41ccf087c2cc8630

v0.2.0

SSkn0tt committed 6 years ago
Unverified
f678ddcc856b77505610aa8d62a2636614c65b07

Extract Config, make AMQP Startup Conditional

SSkn0tt committed 6 years ago
Unverified
ba4eac8a64b179e4d388e77c4fa2e58452515347

Refactor Codebase: DDD

SSkn0tt committed 6 years ago

README

The README file for this repository.

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": "test@test.com",
  "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

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 in your preferred browser.