-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
021a820
commit a425912
Showing
11 changed files
with
4,164 additions
and
4,492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,53 @@ | ||
# mail-parser | ||
|
||
A NestJS project, that can parse e-mails and send push notifications. | ||
An extensible NestJS project, that can parse e-mails and send push notifications. | ||
|
||
Implemented functionalities: | ||
- `Deutsche Post Briefankündigung`: Sends a message to Matrix including an image of the mail envelope from the e-mail | ||
- `DHL mTAN`: Sends a message to Matrix with the mTAN from the e-mail | ||
|
||
--- | ||
## Deutsche Post Briefankündigung | ||
|
||
This functionality takes advantages of the emails send by the Deutsche Post, when a letter is on its way to your mailbox. You need to setup this feature by getting an mail account at web.de or gmx.de. Deutsche Post will sent you a letter to verify your address. | ||
|
||
<p align="center"> | ||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a> | ||
</p> | ||
Afterwards, you can setup an app specific password in your mail account. This password is used to connect to the mail server and parse the e-mails. | ||
|
||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 | ||
[circleci-url]: https://circleci.com/gh/nestjs/nest | ||
### Prerequisites | ||
- A mail account at web.de or gmx.de | ||
- Enable the `Deutsche Post Briefankündigung` feature in your mail account settings | ||
- Setup an app specific password in your mail account settings | ||
- Maubot with the (`hasswebhookbot`)[https://github.com/v411e/hasswebhookbot] plugin installed | ||
- Exposed Maubot endpoint | ||
- A Matrix room with the Maubot bot to sent the push notification to | ||
|
||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> | ||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> | ||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> | ||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> | ||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> | ||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> | ||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> | ||
</p> | ||
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer) | ||
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--> | ||
### Setup | ||
|
||
## Description | ||
|
||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
|
||
## Installation | ||
Run this project with Docker! | ||
|
||
```bash | ||
$ npm install | ||
docker pull alexbabel/mail-parser:latest | ||
``` | ||
|
||
## Running the app | ||
|
||
```bash | ||
# development | ||
$ npm run start | ||
|
||
# watch mode | ||
$ npm run start:dev | ||
|
||
# production mode | ||
$ npm run start:prod | ||
docker-compose: | ||
```yaml | ||
services: | ||
mail-parser: | ||
image: alexbabel/mail-parser:latest | ||
restart: unless-stopped | ||
environment: | ||
- MAIL_HOST=mail.example.com | ||
- MAIL_PORT=993 | ||
- [email protected] | ||
- MAIL_PASSWORD= | ||
- PUSH_ENDPOINT= | ||
- MAIL_ANNOUNCEMENT_PUSH_ROOM= | ||
``` | ||
## Test | ||
|
||
```bash | ||
# unit tests | ||
$ npm run test | ||
|
||
# e2e tests | ||
$ npm run test:e2e | ||
|
||
# test coverage | ||
$ npm run test:cov | ||
``` | ||
|
||
## Support | ||
|
||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | ||
|
||
## Stay in touch | ||
|
||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | ||
- Website - [https://nestjs.com](https://nestjs.com/) | ||
- Twitter - [@nestframework](https://twitter.com/nestframework) | ||
|
||
## License | ||
|
||
Nest is [MIT licensed](LICENSE). | ||
### Environment variables | ||
| Variable | Description | Example | | ||
| --- | --- | --- | | ||
| `MAIL_HOST` | The IMAP mail server to connect to | `imap.example.com` | | ||
| `MAIL_PORT` | The IMAP port of the mail server | `993` | | ||
| `MAIL_USER` | The user to connect to the mail server | `[email protected]` | | ||
| `MAIL_PASSWORD` | The password to connect to the mail server | `secure-password` | | ||
| `PUSH_ENDPOINT` | The endpoint to send the push notification to | `https://matrix-bot.example.com/_matrix/maubot/plugin/mail/push/` | | ||
| `MAIL_ANNOUNCEMENT_PUSH_ROOM` | The Matrix room to send the push notification to | `!LSsicedfgixpqFfsDz:example.com` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.