Skip to Content
ConfigurationEmail Settings

Email Settings

The Email Settings tab configures how Borderbolt sends emails for declaration notifications, invoices, and system communications. You can use Borderbolt’s default SMTP, configure custom SMTP, or connect Microsoft 365 via Graph API.

Email Provider Options

Borderbolt supports three email provider configurations:

1. Default (Borderbolt SMTP)

Use Borderbolt’s shared SMTP infrastructure.

Advantages:

  • Zero configuration required
  • Immediate availability
  • Managed deliverability and reputation
  • No additional costs

Disadvantages:

  • Emails sent from noreply@borderbolt.com (not your domain)
  • Limited customization of sender identity
  • Shared IP reputation

When to Use:

  • Quick setup for testing or initial deployment
  • Small volume email needs
  • Sender domain is not critical

2. Custom SMTP

Use your own SMTP server or third-party email service (Gmail, SendGrid, Mailgun, etc.).

Advantages:

  • Send from your own domain
  • Full control over email infrastructure
  • Better brand consistency
  • Can use existing email provider

Disadvantages:

  • Requires SMTP server configuration
  • Need to manage authentication credentials
  • Responsible for deliverability and reputation

When to Use:

  • You have existing SMTP infrastructure
  • You want emails from your company domain
  • You need control over email routing

3. Microsoft 365 (Graph API)

Connect your Microsoft 365 account using OAuth authentication.

Advantages:

  • Send from your Microsoft 365 mailbox
  • OAuth authentication (no password storage)
  • Support for shared mailboxes
  • Native Microsoft integration
  • Modern, secure authentication

Disadvantages:

  • Requires Microsoft 365 subscription
  • OAuth consent flow required
  • Microsoft Graph API permissions needed

When to Use:

  • Your organization uses Microsoft 365
  • You want maximum security (OAuth)
  • You need shared mailbox support
  • You want integration with Outlook

Custom SMTP Configuration

Required Settings

SMTP Host:

  • Hostname or IP address of your SMTP server
  • Examples: smtp.gmail.com, smtp.sendgrid.net, mail.yourdomain.com

SMTP Port:

  • Common ports:
    • 587 - TLS/STARTTLS (recommended)
    • 465 - SSL (legacy but widely supported)
    • 25 - Unencrypted (not recommended)

SMTP Username:

  • Username for authentication
  • Often an email address (e.g., noreply@yourdomain.com)
  • Some providers use API keys as username

SMTP Password:

  • Password for authentication
  • Can be app-specific password for Gmail
  • API key for services like SendGrid

Encryption:

  • TLS - STARTTLS on port 587 (recommended)
  • SSL - SSL/TLS on port 465
  • None - No encryption (only for trusted internal networks)

From Address:

  • Email address that appears in “From” field
  • Must be authorized by your SMTP provider
  • Example: declarations@yourdomain.com

From Name:

  • Display name that appears in “From” field
  • Example: Borderbolt Declarations or your company name

Security

  • Passwords are encrypted at rest using industry-standard encryption
  • Never logged or exposed in error messages
  • Stored in encrypted database column
  • Can only be updated, not retrieved

Security Best Practice: Use app-specific passwords or API keys instead of primary account passwords. This limits access if credentials are compromised.

Provider-Specific Examples

Gmail (Google Workspace)

Host: smtp.gmail.com Port: 587 Encryption: TLS Username: your-email@gmail.com Password: (App Password, not account password) From Address: your-email@gmail.com From Name: Your Company Name

Setup:

  1. Enable 2-factor authentication on Google account
  2. Generate App Password: https://myaccount.google.com/apppasswords 
  3. Use App Password as SMTP password

SendGrid

Host: smtp.sendgrid.net Port: 587 Encryption: TLS Username: apikey Password: (Your SendGrid API Key) From Address: verified-sender@yourdomain.com From Name: Your Company

Setup:

  1. Create SendGrid account and verify domain
  2. Create API Key with “Mail Send” permission
  3. Use literal string “apikey” as username
  4. Use API key as password

Mailgun

Host: smtp.mailgun.org Port: 587 Encryption: TLS Username: postmaster@yourdomain.com Password: (Mailgun SMTP password) From Address: noreply@yourdomain.com From Name: Your Company

Microsoft 365 (Graph API) Configuration

OAuth Connection Flow

  1. Click “Connect Microsoft 365 Account” button
  2. Sign in with your Microsoft 365 account
  3. Grant permissions when prompted:
    • Mail.Send - Send emails on your behalf
    • User.Read - Read your profile information
  4. Borderbolt receives OAuth token (no password stored)
  5. Select mailbox to send from (primary or shared mailbox)

Shared Mailbox Support

Microsoft 365 integration supports sending from shared mailboxes.

Setup:

  1. Complete OAuth connection with account that has access to shared mailbox
  2. In “From Address” dropdown, select the shared mailbox
  3. Example: declarations@yourdomain.com (shared mailbox)

Requirements:

  • User must have “Send As” or “Send on Behalf” permission for shared mailbox
  • Shared mailbox must be visible in Outlook

From Address Selection

After connecting Microsoft 365:

  • Dropdown shows all mailboxes you can send from
  • Includes your primary mailbox
  • Includes shared mailboxes with appropriate permissions

Token Management

OAuth Token Lifecycle:

  • Tokens are automatically refreshed by Borderbolt
  • No manual token management required
  • Tokens encrypted at rest
  • Token expiration handled automatically

Disconnect:

  • Click “Disconnect Microsoft 365” to revoke access
  • Removes stored OAuth tokens
  • Switches email provider back to default

Security Advantage: OAuth authentication is more secure than password-based SMTP because:

  • No password stored in Borderbolt
  • Scoped permissions (only email sending)
  • Can be revoked from Microsoft 365 admin portal
  • Modern security standards (PKCE, refresh tokens)

Test Email Functionality

Send Test Email

After configuring email settings:

  1. Enter recipient email address
  2. Click “Send Test Email”
  3. Check recipient inbox (and spam folder)
  4. Verify sender address and name are correct

Test Email Contents:

  • Subject: “Borderbolt Test Email”
  • Body: Confirms email settings are working
  • Includes timestamp and organization information
  • Sent using configured provider

Troubleshooting:

  • If test fails, check error message for specific issue
  • Review SMTP credentials for typos
  • Verify SMTP server allows connections from Borderbolt’s IP
  • Check firewall rules if using internal SMTP
  • Review provider logs (SendGrid dashboard, etc.)

Email Types Sent by Borderbolt

Borderbolt sends various types of emails based on system events:

Declaration Notifications

  • Declaration submitted to customs
  • Declaration accepted by customs
  • Declaration rejected by customs
  • Declaration released by customs
  • Control notification received

Invoice Emails

  • Invoice created and sent to customer
  • Invoice payment reminder
  • Invoice overdue notice
  • Statement of account

AI Import Notifications

  • Email received and processed
  • Draft declaration created from email
  • Import failed (with error details)
  • Confirmation emails to senders

System Notifications

  • User invitation emails
  • Password reset requests
  • Two-factor authentication codes
  • Surety balance warnings

Best Practices

Sender Reputation

For Custom SMTP:

  • Use dedicated email address for Borderbolt (e.g., declarations@yourdomain.com)
  • Configure SPF, DKIM, and DMARC records for your domain
  • Monitor bounce rates and spam complaints
  • Use reputable email service provider
  • Avoid sending from personal email accounts

Email Content

  • Include clear subject lines
  • Use professional email templates
  • Add unsubscribe links where required (marketing emails)
  • Include contact information in footer
  • Test emails across different email clients (Outlook, Gmail, etc.)

Authentication

Custom SMTP:

  • Use app-specific passwords instead of account passwords
  • Rotate passwords periodically
  • Use TLS encryption whenever possible
  • Never share SMTP credentials

Microsoft 365:

  • Limit OAuth permissions to only what’s needed
  • Review connected apps periodically in Microsoft 365 admin
  • Use shared mailboxes for team email addresses
  • Monitor sent items in Microsoft 365 admin center

Deliverability

  • Warm up new sender addresses gradually (start with low volume)
  • Monitor delivery rates and engagement
  • Keep email lists clean (remove bounces)
  • Avoid spam trigger words in subject lines
  • Include physical address in footer (required in many jurisdictions)

Updating Settings

  1. Navigate to Settings → Email Settings
  2. Select email provider (Default, Custom SMTP, or Microsoft 365)
  3. Configure provider-specific settings
  4. Click “Send Test Email” to verify
  5. Changes save automatically on blur

Permissions

To edit email settings, users must have the Settings permission. This is typically assigned to:

  • Admin role
  • Manager role

Troubleshooting

Emails Not Sending

Problem: System attempts to send email but fails silently or with errors.

Solutions:

  • Send test email and review error message
  • Verify SMTP credentials are correct
  • Check SMTP host and port are accessible
  • Confirm encryption method matches server requirements
  • Review firewall rules for outbound SMTP
  • Check email provider logs for rejected attempts
  • Verify “From Address” is authorized by SMTP provider

Emails Going to Spam

Problem: Emails are delivered but land in spam folder.

Solutions:

  • Configure SPF record for your domain
  • Set up DKIM signing with your email provider
  • Add DMARC policy to prevent spoofing
  • Use authenticated sender address
  • Avoid spam trigger words in subject/body
  • Ensure consistent “From” address and name
  • Build sender reputation gradually
  • Ask recipients to whitelist your sender address

Microsoft 365 Connection Fails

Problem: OAuth consent flow fails or connection cannot be established.

Solutions:

  • Verify Microsoft 365 subscription is active
  • Check user has “Mail.Send” permission in Microsoft 365 admin
  • Ensure multi-factor authentication is not blocking OAuth
  • Try incognito/private browser window
  • Clear browser cookies and retry
  • Review Microsoft 365 admin logs for OAuth errors
  • Verify Borderbolt app registration in Azure AD

Shared Mailbox Not Appearing

Problem: Shared mailbox doesn’t show in “From Address” dropdown.

Solutions:

  • Verify user has “Send As” permission for shared mailbox
  • Check shared mailbox is added to user’s Outlook profile
  • Wait a few minutes and refresh (permissions can take time to propagate)
  • Reconnect Microsoft 365 account to refresh mailbox list
  • Verify shared mailbox is not hidden in Microsoft 365 admin

Test Email Success But Real Emails Fail

Problem: Test email works but declaration notifications don’t send.

Solutions:

  • Check notification settings are enabled (Settings → Notifications)
  • Verify recipient email addresses are valid in customer records
  • Contact your administrator to check system logs for errors
  • Contact your administrator to verify background processes are running
  • Verify email templates are not causing errors
  • Test with different recipient email domain
Last updated on