Discord Integration
Get email notifications delivered directly to your Discord channels. Choose between our full-featured bot or simple webhook integration.
Integration Methods
Discord Bot
Full-featured bot with slash commands and fine-grained control
Discord Webhook
Simple webhook URL-based notifications
Discord Bot Integration
The Discord Bot integration provides the richest experience with slash commands, multiple channel support, and granular notification settings.
Add the Bot to Your Server
- 1. Go to Dashboard → Hooks
- 2. Click Add Hook
- 3. Select Discord Channel
- 4. Click Add to Discord
A Discord authorization window will open. Select the server you want to add the bot to and authorize it.
Connect Your Server
After adding the bot, you'll receive a connection code. In your Discord server:
- 1. Go to any text channel where the bot has access
- 2. Run the slash command:
/mailhooks connect YOUR_CONNECTION_CODE3. The bot will confirm the connection
Configure a Channel
You can configure channels either through the dashboard or Discord commands.
Option A: Dashboard
- 1. Go to Hooks → Discord tab
- 2. Click Add Channel
- 3. Select server and channel
- 4. Configure notification options
- 5. Click Save
Option B: Discord Commands
In the channel where you want notifications:
/mailhooks setupOr filter by domain:
/mailhooks setup domain:example.comNotification Options
Only receive emails for a specific domain
Display sender and recipient
Include email body preview
List attachment names and sizes
Include full email headers
Attach the original email file
Available Slash Commands
| Command | Description |
|---|---|
/mailhooks connect [code] | Link your server to Mailhooks |
/mailhooks setup | Configure the current channel for notifications |
/mailhooks setup domain:[domain] | Configure with domain filter |
/mailhooks status | View current configuration |
/mailhooks test | Send a test notification |
/mailhooks disconnect | Remove the bot connection |
Discord Webhook Integration
For simpler setups, you can use Discord's built-in webhook feature.
Create a Discord Webhook
- 1. Open your Discord server
- 2. Go to Server Settings → Integrations → Webhooks
- 3. Click New Webhook
- 4. Choose the channel for notifications
- 5. Copy the Webhook URL
Add the Integration
- 1. Go to Dashboard → Discord Integrations
- 2. Click Add Discord Integration
- 3. Fill in the form:
4. Click Create
Test the Integration
Click the Test button next to your integration to send a sample message and verify it's working.
Notification Content
Email notifications include:
- Subject — Email subject line
- From — Sender email address
- To — Recipient email address
- Preview — First portion of email body
- Attachments — List of files with sizes (if enabled)
- Headers — Full email headers (if enabled)
- Authentication — SPF/DKIM/DMARC status indicators
Authentication Status Icons
Passed
Failed
Soft fail / Neutral
Not checked
Domain Filtering
Both integration types support domain filtering:
- All Domains — Receive notifications for any email
- Specific Domain — Only receive emails sent to that domain
This is useful for routing different email addresses to different channels:
| Domain | Channel |
|---|---|
| [email protected] | #orders |
| [email protected] | #support |
| [email protected] | #alerts |
Troubleshooting
Bot not responding to commands
- Ensure the bot has permission to read messages and use slash commands in the channel
- Check that the bot is online (green status indicator)
- Try running
/mailhooks statusto verify connection
Not receiving notifications
- Verify the channel configuration is Active in the dashboard
- Check that domain filtering isn't blocking your emails
- Review the Logs for delivery errors
- Ensure the bot has permission to send messages in the channel
Webhook errors
- Verify the webhook URL is correct and hasn't been deleted
- Test the integration using the Test button
- Check the logs for specific error messages
Rate limiting
Discord has rate limits on webhooks and bots. If you're receiving many emails, consider:
- Filtering to specific domains
- Using the bot integration (higher limits than webhooks)
Bot vs Webhook Comparison
| Feature | Bot | Webhook |
|---|---|---|
| Setup complexity | Medium | Simple |
| Slash commands | ||
| Multiple channels | Easy | Separate webhooks |
| Field visibility control | Limited | |
| Attach EML files | ||
| Mention roles | ||
| Domain filtering | ||
| Delivery logs |