Email Integration
Email Integration
Connect your email accounts to automatically convert emails into support tickets.
Setting Up Email Integration
1. Configure Inbox Email Settings
- Go to Settings → Support → Inboxes
- Select an inbox to configure
- Enter email account details:
- Email Address: The email address to monitor
- Protocol: IMAP or POP3
- Host: Mail server hostname
- Port: Server port (usually 993 for IMAP SSL, 143 for IMAP, 995 for POP3)
- Encryption: SSL/TLS or None
- Username: Email account username
- Password: Email account password or app password
2. Test Connection
- Click "Test Connection" button
- Verify connection is successful
- Save settings
3. Enable Auto-Sync
Email sync runs automatically every 5 minutes via scheduled command. You can also manually sync:
php artisan tickets:sync-inboxes
Or sync a specific inbox:
php artisan tickets:sync-inboxes --inbox=1
How Email-to-Ticket Works
Automatic Conversion
- Email is received in the configured inbox
- System checks if email is from an existing customer
- If customer exists, email is added to existing ticket thread
- If no matching thread, new ticket is created
- Customer is automatically created if email doesn't match existing contact
Email Threading
The system uses email headers to maintain conversation threads:
- Message-ID: Unique identifier for each email
- In-Reply-To: Links reply to original message
- References: Chain of message IDs in conversation
Priority Detection
The system attempts to detect priority from:
- Email subject (e.g., "URGENT", "HIGH PRIORITY")
- Email content keywords
- Default priority from inbox settings
Auto-Assignment
Tickets can be automatically assigned based on:
- Inbox default assignee
- Inbox default team
- Round-robin assignment
- Workflow automation rules
Email Formatting
Supported Content
- Plain Text: Fully supported
- HTML: Converted to plain text for display
- Attachments: Currently logged (full attachment support coming soon)
Email Headers Preserved
- From name and email
- Subject line
- Received timestamp
- Reply-to address
Troubleshooting
Emails Not Creating Tickets
- Check Connection: Verify email account credentials
- Check Logs: Review application logs for errors
- Verify Sync: Ensure scheduled command is running
- Check Spam: Verify emails aren't being filtered
Duplicate Tickets
- System uses email threading to prevent duplicates
- If duplicates occur, check email headers are correct
- Verify Message-ID headers are present
Missing Emails
- Check email server logs
- Verify account has proper permissions
- Ensure emails aren't being deleted before sync
Best Practices
- Use Dedicated Email Accounts: Create separate accounts for support
- Enable IMAP: IMAP is preferred over POP3 for better threading
- Use App Passwords: For Gmail and other providers requiring 2FA
- Monitor Sync Status: Check logs regularly
- Test Before Production: Verify email integration in staging
Manual Email Sync
You can manually trigger email sync:
# Sync all inboxes
php artisan tickets:sync-inboxes
# Sync specific inbox
php artisan tickets:sync-inboxes --inbox=1
# Force re-sync (ignore last sync time)
php artisan tickets:sync-inboxes --force
Future Enhancements
- Email attachment handling
- Reply-to-email functionality
- Email templates with variables
- CC/BCC support
- Email forwarding
Updated on: 13/03/2026
Thank you!
