Skip to content

Send transactional emails. Powered by MJML, Handlebars.

License

Notifications You must be signed in to change notification settings

telostat/mailess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailess

Send mail, less...

Objective

For a request like this:

curl --request POST                               \
     --url http://localhost:3300/sendmail         \
     --user "user:password"                       \
     --header 'Content-Type: multipart/form-data' \
     --form files=@_template.hbs                  \
     --form files=@_metadata.json                 \
     --form [email protected]               \
     --form [email protected]               \
     --form files=@another_attachment2.pdf        \
     --form files=@another_attachment2.pdf

should return:

{
    "status": "SENT",
    "message-id": "<[email protected]>"
}

Development

Run mailcatcher:

docker run --rm -p 1025:25 -p 1080:80 tophfr/mailcatcher:0.7.1

Build the app and run the development server:

npm run build
npm start

Send an email:

cd examples/hello
bash send.sh

Check http://localhost:1080 for the incoming mail.

Dependency Upgrades

To check the outdated dependencies:

ncu

To upgrade them:

ncu -u

Testing

npm run test

Production

Build the image:

docker build --no-cache . -t mailess

.. or using OpenFaaS:

docker build -f Dockerfile.openfaas --no-cache . -t mailess

Run the container:

docker run --rm --network host mailess

... and run examples:

cd examples/hello
bash send.sh

Release Process

The release process is managed by release-please. Please refer to release-please.yml.