Sign inSign up

telostat/mailess

By telostat

•Updated 12 months ago

Image
0

1.9K

telostat/mailess repository overview

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

Tag summary

Content type

Image

Digest

sha256:d3cb58db3…

Size

47.7 MB

Last updated

12 months ago

docker pull telostat/mailess:wip-96-attend-vsts-comments-on-pr-95