Integration Guide

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

Recommended

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.

Step 1

Add the Bot to Your Server

  1. 1. Go to Dashboard → Hooks
  2. 2. Click Add Hook
  3. 3. Select Discord Channel
  4. 4. Click Add to Discord

A Discord authorization window will open. Select the server you want to add the bot to and authorize it.

Step 2

Connect Your Server

After adding the bot, you'll receive a connection code. In your Discord server:

  1. 1. Go to any text channel where the bot has access
  2. 2. Run the slash command:
/mailhooks connect YOUR_CONNECTION_CODE

3. The bot will confirm the connection

Step 3

Configure a Channel

You can configure channels either through the dashboard or Discord commands.

Option A: Dashboard

  1. 1. Go to HooksDiscord tab
  2. 2. Click Add Channel
  3. 3. Select server and channel
  4. 4. Configure notification options
  5. 5. Click Save

Option B: Discord Commands

In the channel where you want notifications:

/mailhooks setup

Or filter by domain:

/mailhooks setup domain:example.com

Notification Options

Domain Filter

Only receive emails for a specific domain

Show From/To

Display sender and recipient

Show Preview

Include email body preview

Show Attachments

List attachment names and sizes

Show Headers

Include full email headers

Attach EML File

Attach the original email file

Available Slash Commands

CommandDescription
/mailhooks connect [code]Link your server to Mailhooks
/mailhooks setupConfigure the current channel for notifications
/mailhooks setup domain:[domain]Configure with domain filter
/mailhooks statusView current configuration
/mailhooks testSend a test notification
/mailhooks disconnectRemove the bot connection

Discord Webhook Integration

For simpler setups, you can use Discord's built-in webhook feature.

Step 1

Create a Discord Webhook

  1. 1. Open your Discord server
  2. 2. Go to Server Settings → Integrations → Webhooks
  3. 3. Click New Webhook
  4. 4. Choose the channel for notifications
  5. 5. Copy the Webhook URL
Step 2

Add the Integration

  1. 1. Go to Dashboard → Discord Integrations
  2. 2. Click Add Discord Integration
  3. 3. Fill in the form:
Name — A friendly name (e.g., "Order Notifications")
Webhook URL — Paste the URL from Discord
Domain — (Optional) Filter to a specific domain
Mention Role ID — (Optional) Role to @mention

4. Click Create

Step 3

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:

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 status to 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

FeatureBotWebhook
Setup complexityMediumSimple
Slash commands
Multiple channelsEasySeparate webhooks
Field visibility controlLimited
Attach EML files
Mention roles
Domain filtering
Delivery logs

Get Started

© 2026 Mailhooks. All rights reserved.