This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
PointStar 0964439441 feat(compose): Task #5 — Compose from Case + URL protocol + auto-file
UI:
- ComposeFromCaseDialog (RTL, search-then-pick a single Case via
  GlobalSearch + entityType=Case filter)
- ComposeFromCaseViewModel — debounced GlobalSearch, returns chosen
  EspoEntityRef

Host:
- ComposeService.ApplyCaseToMailAsync:
  * fetches Case + primary Contact
  * stamps UserProperties EspoCaseId, EspoCaseName, OutlookAddinGuid
  * pre-fills To/Subject and appends an RTL footer with a CRM deep link
- ItemSend hook (in AddInHost.HookItemSend): when the user sends a
  tagged compose, register guid → target with SentItemsWatcher
- SentItemsWatcher: rooted Items reference (prevents GC), 30s expiry
  sweep, 2-min default timeout per pending tag, MailMatched event
- AddInHost.OnSentMailMatched: extracts the sent MailItem, files via
  FilingService, stamps "Filed: {name}" category
- LaunchComposeFromCaseAsync (Inspector ribbon) and
  LaunchComposeFromCaseByIdAsync (URL protocol) entry points
- NamedPipeListener (\.\pipe\MarcusLaw.OutlookAddin) — listens for
  "COMPOSE <caseId>" lines, dispatches on WPF Dispatcher

Ribbon:
- InspectorRibbon.xml — "כתוב מתיק" button on Mail Compose ribbon, hidden
  for received/read mail via getVisible
- ExplorerRibbon class now serves both Explorer and Inspector ribbons
  (single IRibbonExtensibility, dispatches by ribbonID)

URL protocol:
- New OutlookAddinProtocolHandler console project (net48 WinExe):
  parses outlookaddin://compose?caseId=<id>, connects to named pipe,
  writes "COMPOSE <id>\n"
- tools/install-protocol.ps1 + uninstall-protocol.ps1 register the
  scheme under HKCU\Software\Classes\outlookaddin

Core/UI/Tests + protocol handler all build; 38 unit tests still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:47:36 +03:00

OutlookAddin — תוסף EspoCRM ל-Outlook Desktop

תוסף VSTO/COM ל-Outlook ל-Windows שמאפשר לעו"ד לתייק מיילים ל-EspoCRM ישירות מ-Outlook, בלי הגדרת BCC.

פיצ'רים

  1. תיוק מייל קיים לתיק/לקוח — Ribbon button "File to EspoCRM" עם דיאלוג חיפוש (Case/Contact/Lead/Account).
  2. חיפוש לקוח/תיק על מייל נכנס — Reading-pane sidebar שמזהה את השולח ומציג את התיקים הקיימים.
  3. כתיבת מייל חדש מתוך תיק — מ-Outlook (Ribbon ב-compose) או מ-EspoCRM (URL protocol outlookaddin://compose?caseId=...).
  4. סנכרון אוטומטי של תיקיות נבחרות — Auto-file למיילים שמגיעים לתיקיות שמוגדרות לניטור.

דרישות

  • Windows 10/11
  • Outlook desktop: Microsoft 365 / Office 2021 / Office 2019 (לא 2016)
  • .NET Framework 4.8 (מובנה ב-Win10/11)
  • API key ב-EspoCRM (מקבלים מאדמין)

התקנה

ClickOnce — לחץ על הלינק https://platform.dev.marcus-law.co.il/outlook-addin/setup.exe ועקוב אחר ההוראות. Outlook יעלה מחדש אוטומטית.

ארכיטקטורה

  • Server-side: MailRouter v1.2.0 חושף POST /api/v1/MailRouter/file.
  • Client-side: ה-Add-in מדבר עם MailRouter (file) + EspoCRM REST API (search/lookup).
  • Auth: Espo-Authorization: <base64(username:apiKey)> per-user.

מבנה ה-Solution: ראה docs/ARCHITECTURE.md.

פיתוח

# ב-Windows machine עם VS 2022 + VSTO workload
git clone https://gitea.dev.marcus-law.co.il/espocrm-extensions/OutlookAddin.git
cd OutlookAddin
nuget restore
msbuild /t:Build /p:Configuration=Debug
# F5 ב-VS מפעיל Outlook עם ה-Add-in טעון לדיבאג

CI build על Windows runner ב-Gitea Actions — ראה .gitea/workflows/build.yml.

רישיון

Internal use only — Marcus-Law.

S
Description
Archived from gitea.marcus1.com
Readme 1.9 MiB
Languages
C# 99.2%
PowerShell 0.4%
Dockerfile 0.4%