Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bring projects back to life #378

Merged
merged 41 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8bbc466
bugfix: node-sass with node v16 lts https://github.com/soulteary/mail…
soulteary Mar 15, 2022
a18dd34
bugfix: package-lock version not maintained https://github.com/soulte…
soulteary Mar 15, 2022
917d19b
bugfix: remove nodemailer unsupport option: https://github.com/soult…
soulteary Mar 15, 2022
f720f81
chore: upgrade deps: async, commander
soulteary Mar 15, 2022
ba7947c
chore: use https://github.com/poipoii/mailparser-mit instead of https…
soulteary Mar 15, 2022
8689e6f
chore: remove deps: and option
soulteary Mar 15, 2022
a52cb53
chore: update deps: to 3.10.0
soulteary Mar 15, 2022
6c768cf
chore: use turndown instead of strip-tags
soulteary Mar 15, 2022
c4c11a3
chore: update express to 4.17.3
soulteary Mar 15, 2022
7995d78
chore: add https://github.com/nodemailer/smtp-connection to vendor, a…
soulteary Mar 15, 2022
fdf811b
chore: update dev deps
soulteary Mar 15, 2022
4d53160
chore: use environment variables instead of command line arguments
soulteary Mar 15, 2022
73c51b4
chore: change ns to soulteary, for docker image usage
soulteary Mar 15, 2022
3829226
chore: use marked to keep output as html format
soulteary Mar 15, 2022
d6fa52f
chore: cleanup unused file, update docs
soulteary Mar 15, 2022
a2e5b67
chore: fix cli parse, and webserver shutdown callback
soulteary Mar 15, 2022
329d59c
chore: add docker-compose, sendmail example
soulteary Mar 15, 2022
2c7ae41
chore: use wildstring v1.0.10 (unpublish) https://github.com/deltreey…
soulteary Mar 15, 2022
17ee162
chore: update to v4
soulteary Mar 15, 2022
292859a
feat: enable logging of mail contents via CLI option (#1)
LoneRifle Mar 16, 2022
3a54c8d
Merge pull request #4 from LoneRifle/master
soulteary Mar 16, 2022
bc81f18
chore: update version to 1.1.1
soulteary Mar 16, 2022
e7a5b52
chore: restore some files to ensure upstream is correct
soulteary Mar 22, 2022
d7b0a3d
chore: fix code style by npx run standard --fix, upgrade the js versi…
soulteary Mar 22, 2022
02aa368
Merge branch 'master' into feedback-upstream
soulteary Mar 22, 2022
70c17ab
chore: update node lts versions for test, fix npm vulnerabilities, up…
soulteary Mar 22, 2022
06b7bd2
chore: downgrade npm version and got version, compatible with node v14
soulteary Mar 22, 2022
aeaeec4
chore: fix test
soulteary Mar 22, 2022
640687a
chore: fix test
soulteary Mar 22, 2022
b61457f
chore: fix test
soulteary Mar 22, 2022
54f914f
chore: fix api test with node v16
soulteary Mar 22, 2022
3dd7663
chore: fix auth test with node v16
soulteary Mar 22, 2022
92b4268
chore: fix email test with node v16
soulteary Mar 22, 2022
3f1c762
chore: fix outgoing test with node v16
soulteary Mar 22, 2022
16151fd
chore: fix outgoing test with node v16
soulteary Mar 22, 2022
698d70a
chore: fix middleware test with node v16
soulteary Mar 22, 2022
3717936
chore: fix mailserver test with node v16
soulteary Mar 22, 2022
5e2b47f
chore: fix email test with node v16
soulteary Mar 22, 2022
d8f1c9b
chore: improve the dependencies used by the test
soulteary Mar 22, 2022
c815c1a
chore: change port avoid errors in the testing
soulteary Mar 22, 2022
47fc6c0
chore: change port avoid errors in the testing
soulteary Mar 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
# Node LTS https://nodejs.org/en/about/releases/
node-version: [12.22.11, 14.19.1, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{matrix.node-version}}
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base
FROM node:10-alpine as base
FROM node:16-alpine as base
MAINTAINER "Dan Farrelly <daniel.j.farrelly@gmail.com>"

ENV NODE_ENV production
Expand All @@ -10,7 +10,7 @@ FROM base as build
WORKDIR /root
COPY package*.json ./

RUN npm install \
RUN npm install --registry=https://registry.npmmirror.com --production \
&& npm prune \
&& npm cache clean --force \
&& rm package*.json
Expand All @@ -26,8 +26,9 @@ COPY --chown=node:node --from=build /root/node_modules /home/node/node_modules

EXPOSE 1080 1025

ENV MAILDEV_WEB_PORT 1080
ENV MAILDEV_SMTP_PORT 1025
ENTRYPOINT ["/home/node/bin/maildev"]
CMD ["--web", "1080", "--smtp", "1025"]

HEALTHCHECK --interval=10s --timeout=1s \
CMD wget -O - http://localhost:1080/healthz || exit 1
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
# MailDev

[![Test](https://github.com/maildev/maildev/actions/workflows/test.yml/badge.svg)](https://github.com/maildev/maildev/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/maildev/maildev/branch/master/graph/badge.svg)](https://codecov.io/gh/maildev/maildev)
[![NPM Version](https://img.shields.io/npm/v/maildev.svg)](https://www.npmjs.com/package/maildev)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

**MailDev** is a simple way to test your project's generated emails during development with an easy to use web interface that runs on your machine. Built on top of [Node.js](http://www.nodejs.org).

![MailDev Screenshot](https://github.com/maildev/maildev/blob/gh-pages/images/screenshot-2021-01-03.png?raw=true)
![MailDev Screenshot](https://github.com/soulteary/maildev/blob/gh-pages/images/screenshot-2021-01-03.png?raw=true)

## Install & Run

$ npm install -g maildev
$ maildev
## Docker Run

If you want to use MailDev with [Docker](https://www.docker.com/), you can use the
[**maildev/maildev** image on Docker Hub](https://hub.docker.com/r/maildev/maildev).
[**soulteary/maildev** image on Docker Hub](https://hub.docker.com/r/soulteary/maildev).
For a guide for usage with Docker,
[checkout the docs](https://github.com/maildev/maildev/blob/master/docs/docker.md).

$ docker run -p 1080:1080 -p 1025:1025 maildev/maildev
[checkout the docs](https://github.com/soulteary/maildev/blob/master/docs/docker.md).

For convenient use with Grunt, try [grunt-maildev](https://github.com/xavierpriour/grunt-maildev).
$ docker run -p 1080:1080 -p 1025:1025 soulteary/maildev

## Usage

Expand Down Expand Up @@ -56,11 +48,12 @@ Usage: maildev [options]
| `-o, --open` | | Open the Web GUI after startup |
| `-v, --verbose` | | |
| `--silent` | | |
| `--log-mail-contents` | | Log a JSON representation of each incoming mail |

## API

MailDev can be used in your Node.js application. For more info view the
[API docs](https://github.com/maildev/maildev/blob/master/docs/api.md).
[API docs](https://github.com/soulteary/maildev/blob/master/docs/api.md).

```javascript
const MailDev = require("maildev");
Expand All @@ -75,7 +68,7 @@ maildev.on("new", function (email) {
```

MailDev also has a **REST API**. For more info
[view the docs](https://github.com/maildev/maildev/blob/master/docs/rest.md).
[view the docs](https://github.com/soulteary/maildev/blob/master/docs/rest.md).

## Outgoing email

Expand Down Expand Up @@ -136,9 +129,11 @@ Configure your application to send emails via port `1025` and open `localhost:10
**Nodemailer (v1.0+)**

```javascript
// We add this setting to tell nodemailer the host isn't secure during dev
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

const transport = nodemailer.createTransport({
port: 1025,
ignoreTLS: true,
// other settings...
});
```
Expand Down Expand Up @@ -169,11 +164,11 @@ config.action_mailer.delivery_method = :smtp

## Ideas

If you're using MailDev and you have a great idea, I'd love to hear it. If you're not using MailDev because it lacks a feature, I'd love to hear that too. Add an issue to the repo [here](https://github.com/maildev/maildev/issues/new).
If you're using MailDev and you have a great idea, I'd love to hear it. If you're not using MailDev because it lacks a feature, I'd love to hear that too. Add an issue to the repo [here](https://github.com/soulteary/maildev/issues/new).

## Contributing

Any help on MailDev would be awesome. There is plenty of room for improvement. Feel free to [create a Pull Request](https://github.com/maildev/maildev/issues/new) from small to big changes.
Any help on MailDev would be awesome. There is plenty of room for improvement. Feel free to [create a Pull Request](https://github.com/soulteary/maildev/issues/new) from small to big changes.

To run **MailDev** during development:

Expand All @@ -192,7 +187,7 @@ To run the test suite:

$ npm test

## [Changelog](https://github.com/maildev/maildev/releases)
## [Changelog](https://github.com/soulteary/maildev/releases)

## Thanks

Expand All @@ -206,7 +201,7 @@ and [mailparser](https://github.com/nodemailer/mailparser).
Many thanks to Andris as his projects are the backbone of this app and to
[MailCatcher](http://mailcatcher.me/) for the inspiration.

Additionally, thanks to all the awesome [contributors](https://github.com/maildev/maildev/graphs/contributors)
Additionally, thanks to all the awesome [contributors](https://github.com/soulteary/maildev/graphs/contributors)
to the project.

## License
Expand Down