Email integration: IMAP and Google OAuth email setup for CRM #198

Open
opened 2026-06-06 17:14:31 +00:00 by jmiller · 0 comments
Owner

Summary

Allow MokoWaaS CRM users to connect their email accounts via IMAP or Google OAuth, enabling email tracking, sending, and logging directly within the CRM.

Parent issue: #192

Features

Email Account Setup

  • IMAP/SMTP — Manual configuration (host, port, username, password, encryption)
  • Google OAuth — Connect Gmail/Google Workspace via OAuth 2.0 (no password stored)
  • Microsoft OAuth — Future: Connect Outlook/Exchange via OAuth 2.0
  • Per-user email account configuration
  • Test connection button to verify settings

CRM Email Integration

  • Send emails from within CRM contact/deal views
  • Track sent emails as CRM activities (auto-logged)
  • Email collector — Pull incoming emails and match to CRM contacts by email address
  • Email templates — Reusable templates for common communications
  • Signature management — Per-user email signatures

Activity Logging

  • Sent emails auto-create type='email' entries in #__mokowaas_crm_activities
  • Inbound emails matched to contacts show in contact activity timeline
  • Email open/click tracking (optional)

Database Tables

#__mokowaas_crm_email_accounts

  • id, user_id (Joomla user), provider (imap/google/microsoft)
  • email_address, display_name
  • imap_host, imap_port, imap_encryption (ssl/tls/none)
  • smtp_host, smtp_port, smtp_encryption
  • username, password (encrypted)
  • oauth_token, oauth_refresh_token, oauth_expires (for OAuth providers)
  • is_default, enabled, last_sync, created

#__mokowaas_crm_email_templates

  • id, title, subject, body, category, created_by, published

Security

  • Passwords encrypted at rest (Joomla's encryption)
  • OAuth tokens stored securely, auto-refreshed
  • No plaintext credentials in database
  • Per-user isolation — users only see their own email accounts

UI Location

  • User profile → Email Accounts
  • CRM contact view → "Send Email" button
  • CRM deal view → Email activity tab
  • Admin → CRM Settings → Email configuration (global SMTP fallback)
## Summary Allow MokoWaaS CRM users to connect their email accounts via IMAP or Google OAuth, enabling email tracking, sending, and logging directly within the CRM. **Parent issue:** #192 ## Features ### Email Account Setup - **IMAP/SMTP** — Manual configuration (host, port, username, password, encryption) - **Google OAuth** — Connect Gmail/Google Workspace via OAuth 2.0 (no password stored) - **Microsoft OAuth** — Future: Connect Outlook/Exchange via OAuth 2.0 - Per-user email account configuration - Test connection button to verify settings ### CRM Email Integration - **Send emails** from within CRM contact/deal views - **Track sent emails** as CRM activities (auto-logged) - **Email collector** — Pull incoming emails and match to CRM contacts by email address - **Email templates** — Reusable templates for common communications - **Signature management** — Per-user email signatures ### Activity Logging - Sent emails auto-create `type='email'` entries in `#__mokowaas_crm_activities` - Inbound emails matched to contacts show in contact activity timeline - Email open/click tracking (optional) ### Database Tables #### `#__mokowaas_crm_email_accounts` - `id`, `user_id` (Joomla user), `provider` (imap/google/microsoft) - `email_address`, `display_name` - `imap_host`, `imap_port`, `imap_encryption` (ssl/tls/none) - `smtp_host`, `smtp_port`, `smtp_encryption` - `username`, `password` (encrypted) - `oauth_token`, `oauth_refresh_token`, `oauth_expires` (for OAuth providers) - `is_default`, `enabled`, `last_sync`, `created` #### `#__mokowaas_crm_email_templates` - `id`, `title`, `subject`, `body`, `category`, `created_by`, `published` ## Security - Passwords encrypted at rest (Joomla's encryption) - OAuth tokens stored securely, auto-refreshed - No plaintext credentials in database - Per-user isolation — users only see their own email accounts ## UI Location - User profile → Email Accounts - CRM contact view → "Send Email" button - CRM deal view → Email activity tab - Admin → CRM Settings → Email configuration (global SMTP fallback)
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuite#198