Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    SubscriptionConductor
    PaymentConductor
    Payments Overview
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    News Module
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    SubscriptionConductor
    PaymentConductor
    Payments Overview
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    News Module
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    SubscriptionConductor
    PaymentConductor
    Payments Overview
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    News Module
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    1. Docs
    2. /Examples
    3. /Email AI-CRM developer guide

    Updated Jul 21, 20263 min listen

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. Docs
    2. /Examples
    3. /Email AI-CRM developer guide

    Updated Jul 21, 20263 min listen

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. Docs
    2. /Examples
    3. /Email AI-CRM developer guide

    Updated Jul 21, 20263 min listen

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Email AI-CRM developer guide

    Set up the Email AI-CRM module on a local or self-hosted Ring clone: configure channel secrets (or legacy IMAP_*), apply JSONB migrations when using Postgres, then verify ingest and draft send from the admin CRM UI (/admin/crm/*).

    1. Local environment

    Prefer ring-config.emailCrm.channels + channel secrets. Copy the EMAIL CRM block from env.local.template:

    bash
    
    # .env.local — multi-mailbox (recommended)
    CRM_CHANNEL_PRIMARY_PASSWORD=
    # CRM_CHANNEL_PRIMARY_SMTP_PASSWORD=
    
    ANTHROPIC_API_KEY=
    
    CRON_SECRET=generate-a-long-random-string
    EMAIL_AUTO_SEND_ENABLED=false
    WEBHOOK_EMAIL_SECRET=              # optional: webhook ingest instead of IMAP
    EMAIL_CRM_PERSISTENCE=memory       # quick start without DB tables
    
    # Auth OTP stays separate (lib/mailer.ts) — do not reuse for CRM replies:
    # EMAIL_MODE=ethereal
    # or SMTP_HOST / SMTP_USER / SMTP_PASSWORD for noreply@
    
    # Legacy single-mailbox fallback (only when emailCrm.channels empty):
    # IMAP_HOST=mail.example.com
    # IMAP_PORT=993
    # IMAP_TLS=true
    # IMAP_USER=info@example.com
    # IMAP_PASSWORD=
    # SMTP_HOST=mail.example.com
    # SMTP_PORT=587
    # SMTP_USER=info@example.com
    # SMTP_PASSWORD=
    Postgres-backed dev

    Remove EMAIL_CRM_PERSISTENCE=memory and apply migrations below so threads and drafts persist across restarts.

    Auth vs CRM SMTP

    Auth login mail uses SMTP_* / lib/mailer.ts. CRM draft send uses EmailSenderService + CRM_CHANNEL_*. See Ring Mailer.

    2. Database migrations

    When DATABASE_URL points at your dev Postgres:

    bash
    
    psql "$DATABASE_URL" -f data/migrations/009_email_crm_jsonb.sql
    psql "$DATABASE_URL" -f data/migrations/010_email_crm_tasks_jsonb.sql
    psql "$DATABASE_URL" -c "\dt email_*"
    Do not use 001_email_crm_schema.sql

    001_email_crm_schema.sql is deprecated. Always apply 009 + 010 only.

    3. Trigger ingest (local)

    Option A — cron poll (matches production):

    bash
    
    curl -sS -X POST "http://localhost:3000/api/cron/email-processor" \
      -H "Authorization: Bearer $CRON_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'

    Option B — webhook (no IMAP required for the test):

    bash
    
    BODY='{"messageId":"<test@local>","from":"you@example.com","to":"info@example.com","subject":"Hi","bodyText":"Hello"}'
    SIG=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_EMAIL_SECRET" | awk '{print $2}')
    
    curl -X POST "http://localhost:3000/api/webhooks/email/inbound" \
      -H "Content-Type: application/json" \
      -H "X-Email-Webhook-Signature: $SIG" \
      -d "$BODY"

    4. CRM SMTP smoke test

    1. Ensure channel passwords resolve (GET /api/admin/email/channels as admin → hasImapPassword / hasSmtpPassword).
    2. Send a test message to the channel inbox (or use the webhook).
    3. Run cron poll.
    4. Open Admin → CRM Inbox (/admin/crm/inbox) — optional channel filter.
    5. Open CRM Drafts — approve and send.
    6. Confirm reply in the sender mailbox and an outbound row in email_messages.

    Only then set EMAIL_AUTO_SEND_ENABLED=true.

    5. Admin UI checklist

    PageURLExpect
    Inbox/{locale}/admin/crm/inboxLive threads; channel filter; channel status chips
    Thread/{locale}/admin/crm/inbox/<threadId>Message timeline
    Drafts/{locale}/admin/crm/draftsApprove / reject / send
    Contacts/{locale}/admin/crm/contactsCRM from processor
    Analytics/{locale}/admin/crm/analyticsCost from email_api_usage
    Tasks/{locale}/admin/crm/tasksAuto-created follow-ups

    All CRM pages use CrmAdminShell (horizontal tabs; no right rail). APIs remain /api/admin/email/*.

    6. Production cron

    Schedule the same poll endpoint on your deployed BASE_URL every 1–5 minutes:

    Optional analytics snapshot: GET $BASE_URL/api/cron/email-analytics with the same Bearer token.

    Ops: data/migrations/EMAIL-CRM-OPS.md.

    Troubleshooting

    SymptomCheck
    Empty inboxMigrations applied (or EMAIL_CRM_PERSISTENCE=memory)? Cron poll returning processed > 0?
    Channel status redCRM_CHANNEL_PRIMARY_PASSWORD set? ring-config.emailCrm.enabled true?
    No AI draftANTHROPIC_API_KEY set? Security pipeline blocked? Check server logs.
    Duplicate processingShould not occur — email_messages Message-ID dedup
    Draft send failsChannel SMTP password / host (EmailSenderService), not Auth SMTP_*
    Auto-send silentEMAIL_AUTO_SEND_ENABLED=true and confidence rules met
    401 on cronCRON_SECRET matches Authorization: Bearer header
    Jsonb / circular require

    Related documentation

    Related documentation

    Email AI-CRM

    Prerequisite: feature overview and Auth vs CRM SMTP rules.

    Email AI-CRM API

    Deep-dive: channels route and cron action contracts.

    Email AI-CRM architecture

    Deep-dive: EmailProcessor and persistence layout.

    Ring Mailer & RingdomX Mail

    See-also: Auth SMTP and cleanup-email-tokens.

    Email AI-CRM developer guide

    Set up the Email AI-CRM module on a local or self-hosted Ring clone: configure channel secrets (or legacy IMAP_*), apply JSONB migrations when using Postgres, then verify ingest and draft send from the admin CRM UI (/admin/crm/*).

    1. Local environment

    Prefer ring-config.emailCrm.channels + channel secrets. Copy the EMAIL CRM block from env.local.template:

    bash
    
    # .env.local — multi-mailbox (recommended)
    CRM_CHANNEL_PRIMARY_PASSWORD=
    # CRM_CHANNEL_PRIMARY_SMTP_PASSWORD=
    
    ANTHROPIC_API_KEY=
    
    CRON_SECRET=generate-a-long-random-string
    EMAIL_AUTO_SEND_ENABLED=false
    WEBHOOK_EMAIL_SECRET=              # optional: webhook ingest instead of IMAP
    EMAIL_CRM_PERSISTENCE=memory       # quick start without DB tables
    
    # Auth OTP stays separate (lib/mailer.ts) — do not reuse for CRM replies:
    # EMAIL_MODE=ethereal
    # or SMTP_HOST / SMTP_USER / SMTP_PASSWORD for noreply@
    
    # Legacy single-mailbox fallback (only when emailCrm.channels empty):
    # IMAP_HOST=mail.example.com
    # IMAP_PORT=993
    # IMAP_TLS=true
    # IMAP_USER=info@example.com
    # IMAP_PASSWORD=
    # SMTP_HOST=mail.example.com
    # SMTP_PORT=587
    # SMTP_USER=info@example.com
    # SMTP_PASSWORD=
    Postgres-backed dev

    Remove EMAIL_CRM_PERSISTENCE=memory and apply migrations below so threads and drafts persist across restarts.

    Auth vs CRM SMTP

    Auth login mail uses SMTP_* / lib/mailer.ts. CRM draft send uses EmailSenderService + CRM_CHANNEL_*. See Ring Mailer.

    2. Database migrations

    When DATABASE_URL points at your dev Postgres:

    bash
    
    psql "$DATABASE_URL" -f data/migrations/009_email_crm_jsonb.sql
    psql "$DATABASE_URL" -f data/migrations/010_email_crm_tasks_jsonb.sql
    psql "$DATABASE_URL" -c "\dt email_*"
    Do not use 001_email_crm_schema.sql

    001_email_crm_schema.sql is deprecated. Always apply 009 + 010 only.

    3. Trigger ingest (local)

    Option A — cron poll (matches production):

    bash
    
    curl -sS -X POST "http://localhost:3000/api/cron/email-processor" \
      -H "Authorization: Bearer $CRON_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'

    Option B — webhook (no IMAP required for the test):

    bash
    
    BODY='{"messageId":"<test@local>","from":"you@example.com","to":"info@example.com","subject":"Hi","bodyText":"Hello"}'
    SIG=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_EMAIL_SECRET" | awk '{print $2}')
    
    curl -X POST "http://localhost:3000/api/webhooks/email/inbound" \
      -H "Content-Type: application/json" \
      -H "X-Email-Webhook-Signature: $SIG" \
      -d "$BODY"

    4. CRM SMTP smoke test

    1. Ensure channel passwords resolve (GET /api/admin/email/channels as admin → hasImapPassword / hasSmtpPassword).
    2. Send a test message to the channel inbox (or use the webhook).
    3. Run cron poll.
    4. Open Admin → CRM Inbox (/admin/crm/inbox) — optional channel filter.
    5. Open CRM Drafts — approve and send.
    6. Confirm reply in the sender mailbox and an outbound row in email_messages.

    Only then set EMAIL_AUTO_SEND_ENABLED=true.

    5. Admin UI checklist

    PageURLExpect
    Inbox/{locale}/admin/crm/inboxLive threads; channel filter; channel status chips
    Thread/{locale}/admin/crm/inbox/<threadId>Message timeline
    Drafts/{locale}/admin/crm/draftsApprove / reject / send
    Contacts/{locale}/admin/crm/contactsCRM from processor
    Analytics/{locale}/admin/crm/analyticsCost from email_api_usage
    Tasks/{locale}/admin/crm/tasksAuto-created follow-ups

    All CRM pages use CrmAdminShell (horizontal tabs; no right rail). APIs remain /api/admin/email/*.

    6. Production cron

    Schedule the same poll endpoint on your deployed BASE_URL every 1–5 minutes:

    Optional analytics snapshot: GET $BASE_URL/api/cron/email-analytics with the same Bearer token.

    Ops: data/migrations/EMAIL-CRM-OPS.md.

    Troubleshooting

    SymptomCheck
    Empty inboxMigrations applied (or EMAIL_CRM_PERSISTENCE=memory)? Cron poll returning processed > 0?
    Channel status redCRM_CHANNEL_PRIMARY_PASSWORD set? ring-config.emailCrm.enabled true?
    No AI draftANTHROPIC_API_KEY set? Security pipeline blocked? Check server logs.
    Duplicate processingShould not occur — email_messages Message-ID dedup
    Draft send failsChannel SMTP password / host (EmailSenderService), not Auth SMTP_*
    Auto-send silentEMAIL_AUTO_SEND_ENABLED=true and confidence rules met
    401 on cronCRON_SECRET matches Authorization: Bearer header
    Jsonb / circular require

    Related documentation

    Related documentation

    Email AI-CRM

    Prerequisite: feature overview and Auth vs CRM SMTP rules.

    Email AI-CRM API

    Deep-dive: channels route and cron action contracts.

    Email AI-CRM architecture

    Deep-dive: EmailProcessor and persistence layout.

    Ring Mailer & RingdomX Mail

    See-also: Auth SMTP and cleanup-email-tokens.

    Email AI-CRM developer guide

    Set up the Email AI-CRM module on a local or self-hosted Ring clone: configure channel secrets (or legacy IMAP_*), apply JSONB migrations when using Postgres, then verify ingest and draft send from the admin CRM UI (/admin/crm/*).

    1. Local environment

    Prefer ring-config.emailCrm.channels + channel secrets. Copy the EMAIL CRM block from env.local.template:

    bash
    
    # .env.local — multi-mailbox (recommended)
    CRM_CHANNEL_PRIMARY_PASSWORD=
    # CRM_CHANNEL_PRIMARY_SMTP_PASSWORD=
    
    ANTHROPIC_API_KEY=
    
    CRON_SECRET=generate-a-long-random-string
    EMAIL_AUTO_SEND_ENABLED=false
    WEBHOOK_EMAIL_SECRET=              # optional: webhook ingest instead of IMAP
    EMAIL_CRM_PERSISTENCE=memory       # quick start without DB tables
    
    # Auth OTP stays separate (lib/mailer.ts) — do not reuse for CRM replies:
    # EMAIL_MODE=ethereal
    # or SMTP_HOST / SMTP_USER / SMTP_PASSWORD for noreply@
    
    # Legacy single-mailbox fallback (only when emailCrm.channels empty):
    # IMAP_HOST=mail.example.com
    # IMAP_PORT=993
    # IMAP_TLS=true
    # IMAP_USER=info@example.com
    # IMAP_PASSWORD=
    # SMTP_HOST=mail.example.com
    # SMTP_PORT=587
    # SMTP_USER=info@example.com
    # SMTP_PASSWORD=
    Postgres-backed dev

    Remove EMAIL_CRM_PERSISTENCE=memory and apply migrations below so threads and drafts persist across restarts.

    Auth vs CRM SMTP

    Auth login mail uses SMTP_* / lib/mailer.ts. CRM draft send uses EmailSenderService + CRM_CHANNEL_*. See Ring Mailer.

    2. Database migrations

    When DATABASE_URL points at your dev Postgres:

    bash
    
    psql "$DATABASE_URL" -f data/migrations/009_email_crm_jsonb.sql
    psql "$DATABASE_URL" -f data/migrations/010_email_crm_tasks_jsonb.sql
    psql "$DATABASE_URL" -c "\dt email_*"
    Do not use 001_email_crm_schema.sql

    001_email_crm_schema.sql is deprecated. Always apply 009 + 010 only.

    3. Trigger ingest (local)

    Option A — cron poll (matches production):

    bash
    
    curl -sS -X POST "http://localhost:3000/api/cron/email-processor" \
      -H "Authorization: Bearer $CRON_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'

    Option B — webhook (no IMAP required for the test):

    bash
    
    BODY='{"messageId":"<test@local>","from":"you@example.com","to":"info@example.com","subject":"Hi","bodyText":"Hello"}'
    SIG=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_EMAIL_SECRET" | awk '{print $2}')
    
    curl -X POST "http://localhost:3000/api/webhooks/email/inbound" \
      -H "Content-Type: application/json" \
      -H "X-Email-Webhook-Signature: $SIG" \
      -d "$BODY"

    4. CRM SMTP smoke test

    1. Ensure channel passwords resolve (GET /api/admin/email/channels as admin → hasImapPassword / hasSmtpPassword).
    2. Send a test message to the channel inbox (or use the webhook).
    3. Run cron poll.
    4. Open Admin → CRM Inbox (/admin/crm/inbox) — optional channel filter.
    5. Open CRM Drafts — approve and send.
    6. Confirm reply in the sender mailbox and an outbound row in email_messages.

    Only then set EMAIL_AUTO_SEND_ENABLED=true.

    5. Admin UI checklist

    PageURLExpect
    Inbox/{locale}/admin/crm/inboxLive threads; channel filter; channel status chips
    Thread/{locale}/admin/crm/inbox/<threadId>Message timeline
    Drafts/{locale}/admin/crm/draftsApprove / reject / send
    Contacts/{locale}/admin/crm/contactsCRM from processor
    Analytics/{locale}/admin/crm/analyticsCost from email_api_usage
    Tasks/{locale}/admin/crm/tasksAuto-created follow-ups

    All CRM pages use CrmAdminShell (horizontal tabs; no right rail). APIs remain /api/admin/email/*.

    6. Production cron

    Schedule the same poll endpoint on your deployed BASE_URL every 1–5 minutes:

    Optional analytics snapshot: GET $BASE_URL/api/cron/email-analytics with the same Bearer token.

    Ops: data/migrations/EMAIL-CRM-OPS.md.

    Troubleshooting

    SymptomCheck
    Empty inboxMigrations applied (or EMAIL_CRM_PERSISTENCE=memory)? Cron poll returning processed > 0?
    Channel status redCRM_CHANNEL_PRIMARY_PASSWORD set? ring-config.emailCrm.enabled true?
    No AI draftANTHROPIC_API_KEY set? Security pipeline blocked? Check server logs.
    Duplicate processingShould not occur — email_messages Message-ID dedup
    Draft send failsChannel SMTP password / host (EmailSenderService), not Auth SMTP_*
    Auto-send silentEMAIL_AUTO_SEND_ENABLED=true and confidence rules met
    401 on cronCRON_SECRET matches Authorization: Bearer header
    Jsonb / circular require

    Related documentation

    Related documentation

    Email AI-CRM

    Prerequisite: feature overview and Auth vs CRM SMTP rules.

    Email AI-CRM API

    Deep-dive: channels route and cron action contracts.

    Email AI-CRM architecture

    Deep-dive: EmailProcessor and persistence layout.

    Ring Mailer & RingdomX Mail

    See-also: Auth SMTP and cleanup-email-tokens.

    Orders/{locale}/admin/crm/ordersProject orders desk (Owner Project Lab)
    Types in features/email-crm/types/*; no CJS require() of Jsonb repos

    Database migrations

    Same-workflow: kingdom migration order and run-migration.sh.

    bash
    
    curl -sS -X POST "$BASE_URL/api/cron/email-processor" \
      -H "Authorization: Bearer ${CRON_SECRET}" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'
    Orders/{locale}/admin/crm/ordersProject orders desk (Owner Project Lab)
    Types in features/email-crm/types/*; no CJS require() of Jsonb repos

    Database migrations

    Same-workflow: kingdom migration order and run-migration.sh.

    bash
    
    curl -sS -X POST "$BASE_URL/api/cron/email-processor" \
      -H "Authorization: Bearer ${CRON_SECRET}" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'
    Orders/{locale}/admin/crm/ordersProject orders desk (Owner Project Lab)
    Types in features/email-crm/types/*; no CJS require() of Jsonb repos

    Database migrations

    Same-workflow: kingdom migration order and run-migration.sh.

    bash
    
    curl -sS -X POST "$BASE_URL/api/cron/email-processor" \
      -H "Authorization: Bearer ${CRON_SECRET}" \
      -H "Content-Type: application/json" \
      -d '{"action":"poll"}'