Skip to content

feat: Add Resend SMTP integration, free lead discovery & email resolution, and local dashboard - #956

Closed
juliolimacostavalladares wants to merge 2 commits into
eracle:mainfrom
juliolimacostavalladares:feat/resend-free-provider-and-web-ui
Closed

feat: Add Resend SMTP integration, free lead discovery & email resolution, and local dashboard#956
juliolimacostavalladares wants to merge 2 commits into
eracle:mainfrom
juliolimacostavalladares:feat/resend-free-provider-and-web-ui

Conversation

@juliolimacostavalladares

@juliolimacostavalladares juliolimacostavalladares commented Sep 8, 2026

Copy link
Copy Markdown

Summary of Changes

1. Resend Outbound Email Integration (Full SMTP Spec)

  • Host & Credentials: Configures smtp.resend.com automatically when an API key starting with re_ is provided. Uses literal username "resend".
  • Port & Transport Flexibility:
    • SMTPS (Implicit SSL/TLS) on ports 465 and 2465 using smtplib.SMTP_SSL.
    • STARTTLS (Explicit SSL/TLS) on ports 25, 587 (default), and 2587 using smtplib.SMTP upgraded with starttls().
  • Idempotency Key Support: Automatically attaches the Resend-Idempotency-Key header (e.g. openoutreach-<id>-<msgid>) to prevent duplicate email transmissions on retries.
  • Gmail Threading Protection: Automatically injects X-Entity-Ref-ID for initial cold outreach to prevent Gmail from grouping unrelated outreach emails.
  • IMAP Graceful Bypass: Bypasses IMAP warmth measurement and folder sync since Resend provides an outbound-only SMTP interface.

2. Free Lead Discovery & Email Resolution (Zero-Cost Alternative)

  • Replaces the hard requirement for a paid BetterContact API key with a built-in free discovery engine and free email resolver:
    • Free Discovery: Uses the configured LLM (e.g. 9router with cbai/minimax-m3) based on product_docs and campaign_target to generate high-fit B2B prospects in Brazil with realistic roles, companies, and LinkedIn profiles.
    • Free Email Resolver: Resolves corporate email patterns (first.last@domain, first@domain) with MX verification and unlimited credit balance.
    • Automatically promotes qualified leads for email lookup at zero financial cost.

3. Gateway & Model Prefix Normalization

  • Supports local gateways like 9router (http://localhost:20128/v1) by auto-prefixing openai_compatible: when no provider prefix is supplied.
  • Added pydantic-ai 2.x compatibility shim aliasing OpenAIModel to OpenAIChatModel.

4. Local Web Dashboard & Job Diagnostics

  • Adds a local web interface (openoutreach-web) at http://127.0.0.1:8000 with a Portuguese UI for reviewing leads, viewing match rationale, managing campaign parameters, and triggering bounded searches.
  • Captures child process stderr in jobs.py so exact error diagnostics are displayed in the dashboard banner if an issue arises.
  • Updates dashboard cards to display Free Provider and Resend status.

5. Automated Tests

  • Full test suite passing (44 tests in pytest), covering adapters, web views, forms normalization, export, wizard workflows, and Resend port/idempotency tests.

@eracle

eracle commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Sorry but this part was moved to openOutSend, check it out

@eracle eracle closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants