Skip to main content

Email

Email Integration Guide

Overview

This guide explains how to connect Bridged with your email infrastructure to enable email sending, receiving, and synchronization capabilities. The integration supports reading emails from mailboxes for customer context, sending transactional and marketing emails, and syncing email engagement data.

Bridged supports three primary methods for email integration:

  • Microsoft Graph API - For Microsoft 365 / Outlook mailboxes

  • IMAP/SMTP - For standard email protocols (Gmail, custom domains, etc.)

  • Third-party platforms - Freshdesk (customer support) and Mailchimp (email marketing)

Prerequisites

Before starting, ensure you have:

For Microsoft Graph API

  • A Microsoft 365 tenant with Exchange Online licenses

  • An Azure AD application with appropriate permissions

  • A user account with mailbox access (service account recommended)

For IMAP/SMTP

  • Email server hostname and port numbers

  • Email account credentials (username and password)

  • Network access to the email server (allowlisted IPs if required)

For Freshdesk

  • A Freshdesk account with API access

  • Your Freshdesk domain (e.g., yourcompany.freshdesk.com)

  • Your Freshdesk API key

For Mailchimp

  • A Mailchimp account with API access

  • Your Mailchimp API key

  • Your Datacenter ID (e.g., us1, us19)

Connection Methods

Bridged supports four authentication methods for email integration:

Method

Best for

Setup complexity

Microsoft Graph OAuth 2.0 (Preferred)

Microsoft 365/Outlook mailboxes

Medium

IMAP/SMTP with credentials

Gmail, custom domains, legacy systems

Low

Freshdesk API Key

Customer support email sync

Low

Mailchimp API Key

Email marketing operations

Low

Recommendation: For Microsoft 365 environments, use OAuth 2.0 with Microsoft Graph. For other providers, IMAP/SMTP with credentials is the standard approach.

Part 1: Microsoft Graph API (Microsoft 365 / Outlook)

Microsoft Graph provides a unified API endpoint to access Microsoft 365 services including Outlook mailboxes, calendars, and contacts .

Step 1: Register an Application in Azure AD

  1. Navigate to the Azure PortalAzure Active DirectoryApp registrations .

  2. Click New registration.

  3. Fill in the application details:

    • Name: Bridged Email Integration

    • Supported account types: Select based on your needs (single tenant recommended)

    • Redirect URI: https://gateway.bridged.media/auth/microsoft/callback

  4. Click Register.

  5. Note the Application (client) ID and Directory (tenant) ID.

Step 2: Configure API Permissions

  1. In your registered app, navigate to API permissions .

  2. Click Add a permissionMicrosoft Graph.

  3. Select Application permissions (for server-to-server calls) or Delegated permissions (for user context).

  4. Add the following permissions:

Permission

Type

Description

Mail.Read

Application/Delegated

Read user mailboxes

Mail.ReadWrite

Application/Delegated

Read and write mail

Mail.Send

Application/Delegated

Send emails

User.Read

Application/Delegated

Read user profile (for email address)

  1. Click Add permissions.

  2. Click Grant admin consent (if using Application permissions).

Step 3: Create a Client Secret

  1. Navigate to Certificates & secrets .

  2. Click New client secret.

  3. Provide a description and expiration period.

  4. Click Add.

  5. Copy and save the client secret value - you won't be able to see it again.

Step 4: Configure Bridged to Connect to Microsoft Graph

  1. Log in to your Bridged dashboard.

  2. Navigate to the Integrations section. If you do not see this section, contact support@bridged.media.

  3. Click EmailConnect AccountMicrosoft Graph.

  4. Enter the following credentials:

Field

Description

Where to find

Tenant ID

Your Azure AD tenant identifier

App Overview page

Client ID

Your application client ID

App Overview page

Client Secret

The client secret you created

Certificates & secrets

User ID / Email

The mailbox to access (for Application permissions)

User's email address

  1. Click Connect.

Step 5: Send an Email Using Microsoft Graph (Example)

Once connected, Bridged uses the Microsoft Graph API to send emails. The underlying implementation follows this pattern :

bash

POST https://graph.microsoft.com/v1.0/me/sendMail
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "message": {
    "subject": "Hello from Bridged",
    "body": {
      "contentType": "Text",
      "content": "This email was sent via Bridged."
    },
    "toRecipients": [
      {
        "emailAddress": {
          "address": "customer@example.com"
        }
      }
    ]
  }
}

Part 2: IMAP/SMTP (Gmail, Custom Domains, etc.)

For non-Microsoft email providers, Bridged supports standard IMAP (receiving) and SMTP (sending) protocols.

Common Server Configurations

Provider

IMAP Server

IMAP Port

SMTP Server

SMTP Port

Gmail

imap.gmail.com

993 (SSL)

smtp.gmail.com

587 (TLS)

Outlook.com

outlook.office365.com

993 (SSL)

smtp.office365.com

587 (TLS)

Yahoo

imap.mail.yahoo.com

993 (SSL)

smtp.mail.yahoo.com

465 (SSL)

Custom Domain

Provided by host

Typically 993 or 143

Provided by host

Typically 587 or 465

Step 1: Prepare Your Email Account

For Gmail, you may need to:

  1. Enable IMAP in Gmail Settings → Forwarding and POP/IMAP.

  2. Generate an App Password if using 2-Factor Authentication.

Step 2: Configure Bridged to Connect via IMAP/SMTP

  1. In Bridged, navigate to IntegrationsEmailConnect AccountIMAP/SMTP.

  2. Enter the following:

Field

Description

Email Address

The full email address

IMAP Server

IMAP hostname

IMAP Port

Port number (usually 993 for SSL)

SMTP Server

SMTP hostname

SMTP Port

Port number (usually 587 for TLS)

Username

Usually the full email address

Password

Email password or app password

Security

SSL/TLS or STARTTLS

  1. Click Test Connection to verify settings.

  2. Click Connect.

Part 3: Freshdesk (Customer Support Email)

Freshdesk integration allows Bridged to sync support contacts and email conversations from your helpdesk platform .

Step 1: Obtain Your Freshdesk Credentials

  1. Log in to your Freshdesk account.

  2. Click on your Profile iconProfile Settings .

  3. Click View API Key.

  4. Copy your API key.

  5. Note your Freshdesk domain (e.g., yourcompany.freshdesk.com).

Step 2: Configure Bridged to Connect to Freshdesk

  1. In Bridged, navigate to IntegrationsEmailConnect AccountFreshdesk.

  2. Enter the following:

Field

Description

Domain

Your Freshdesk domain (e.g., yourcompany.freshdesk.com)

API Key

Your Freshdesk API key

  1. Click Connect.

Step 3: Data Synced from Freshdesk

When connected, Bridged imports :

Data Type

Description

Contacts

Email, first name, last name, company

Custom fields

Any additional contact fields

Tags

Contacts are tagged via_freshdesk for identification

Note: Tickets, agents, groups, and support history are not imported. Only contacts are synced .

Step 4: Sync Frequency

  • Initial sync: Imports all existing contacts

  • Incremental sync: Checks for new and updated contacts every hour

  • Contacts are deduplicated by email address

Part 4: Mailchimp (Email Marketing)

Mailchimp integration allows Bridged to sync subscriber data and trigger email marketing campaigns .

Step 1: Obtain Your Mailchimp Credentials

  1. Log in to your Mailchimp account.

  2. Navigate to AccountExtrasAPI Keys .

  3. Click Create A Key.

  4. Copy the API key.

  5. Find your Datacenter ID in the URL (e.g., us1 in https://us1.admin.mailchimp.com).

Step 2: Configure Bridged to Connect to Mailchimp

  1. In Bridged, navigate to IntegrationsEmailConnect AccountMailchimp.

  2. Enter the following:

Field

Description

API Key

Your Mailchimp API key

Datacenter ID

Your datacenter prefix (e.g., us1, us19)

Audience ID (optional)

The default audience/list to sync to

  1. Click Connect.

Step 3: Syncing Contacts to Mailchimp

When a user is identified in Bridged, their profile can be synced to Mailchimp. The integration:

  1. Checks if the email exists in your Mailchimp audience

  2. If new, subscribes the user (with optional double opt-in)

  3. If existing, updates user traits (does not resubscribe unsubscribed users)

Step 4: Custom Merge Fields

To sync custom user traits to Mailchimp:

  1. Create custom merge fields in Mailchimp (max 10 characters for merge tag)

  2. Send the traits in your identify calls

Example:

json

{
  "email": "customer@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "company": "Acme Inc",
  "accountType": "premium"
}

Important: Merge tags are converted to uppercase. Underscores are removed .

Step 5: Subscription Status Management

You can manually update a user's subscription status:

Status

Description

subscribed

Active subscriber

unsubscribed

Opted out

pending

Awaiting double opt-in confirmation

cleaned

Bounced or invalid

Configure Sync Settings

Once connected, configure the following:

Setting

Options

Description

Sync direction

Inbound only, Outbound only, Both

Define email flow

Mailbox folders

Inbox, Sent, Custom

Which folders to monitor

Sync frequency

Real-time (webhook), Hourly, Daily

How often to check for new emails

Attachment handling

Download, Skip, Metadata only

Process email attachments

Email age limit

Days (e.g., 30, 90, 365)

Only sync emails within date range

Bulk sync limit: Each bulk operation is limited to 50 records per request.

Common Use Cases

Playbook

Direction

Description

Activation

Outbound

Send marketing or transactional emails to leads

Qualification Agent

Inbound

Read customer email history for lead scoring context

Nurture & Conversion

Both

Sync email engagement (opens, clicks) to CRM

Customer Support

Inbound + Outbound

Sync support tickets and replies via Freshdesk

Email Marketing

Outbound

Manage Mailchimp subscribers and trigger campaigns

Rate Limiting & Performance

  • Rate limits depend on your email provider, not on Bridged

  • Microsoft Graph: Standard throttling based on tenant size

  • Mailchimp: API key allows max 10 concurrent requests

  • Bulk operations: Maximum 50 records per request

Security & Permissions

  • Microsoft Graph: OAuth 2.0 with encrypted tokens, never stored in plain text

  • IMAP/SMTP: Credentials encrypted at rest and in transit

  • API Keys: All keys stored encrypted (Freshdesk, Mailchimp)

  • All API calls made over TLS 1.2+

  • Access can be revoked at any time from the Bridged dashboard

Microsoft Graph Required Permissions

Permission

Required for

Mail.Read

Reading emails for context

Mail.Send

Sending outbound emails

User.Read

Getting user email address

Troubleshooting

Issue

Likely cause

Solution

Microsoft Graph auth fails

Invalid tenant/client ID or secret

Verify credentials in Azure portal

IMAP connection fails

Incorrect server or port

Verify server settings with provider

Freshdesk sync fails

Invalid API key or domain

Check API key in Freshdesk profile settings

Mailchimp sync fails

Invalid API key or datacenter ID

Verify API key and check URL for datacenter prefix

No data appears

Field mapping incorrect

Check that email fields match Bridged profile attributes

Mailchimp 400 error

Invalid email domain

Verify email address is properly formatted

Mailchimp 404 errors

Concurrent requests for same user

Reduce sync frequency; Mailchimp limits to 10 concurrent requests

Gmail connection fails

2FA enabled

Generate and use an App Password instead

Rate limiting (429)

Too many API calls

Reduce sync frequency or upgrade provider plan

Microsoft Graph Specific Issues

If testing with a Microsoft 365 developer tenant, sent emails may not be delivered. Contact Microsoft support to unblock email sending .

Support

For integration support, contact your Bridged account manager or email support@bridged.media.