A small program that forwards emails from mailboxes to a Discord channel.
- Forwards emails to a specified Discord channel using webhooks.
- Supports both received and sent emails.
- Create an
env-config.jsonfile in the root directory of the project. - Add your IMAP account details and webhook URLs to the
env-config.jsonfile. The file should look like this:
{
"instances": [
{
"mailAccount": {
"host": "imap.example.com",
"port": 993,
"secure": true,
"auth": {
"user": "[email protected]",
"pass": "your-email-password"
}
},
"webhooks": [
{
"url": "https://discord.com/api/webhooks/your-webhook-id/your-webhook-token",
"threadId": "optional-thread-id"
}
]
}
]
}- We recommend running the program using Docker. Here is an example
docker-compose.yml
name: "emails-forwarder"
services:
emails-forwarder:
image: ghcr.io/devsjony/emails-forwarder:master
restart: unless-stopped
volumes:
- type: bind
source: ./env-config.json
target: /app/env-config.jsonYou can also run this manually using node:
pnpm run start:dev