Skip to main content

Function: sendCompanyEmail()

sendCompanyEmail(svc, companyId, msg, opts): Promise<SendEmailResult>

Defined in: src/server/services/email.ts:129

Company-aware send: resolve the company + per-process delivery settings, honor the enabled kill switch, merge From / Reply-to / CC / BCC (company → process → per-send, de-duped), then delegate to sendEmail. Backward-compatible — callers keep passing the same EmailMessage; opts.cc / opts.bcc add ad-hoc per-send recipients on top of the saved process defaults.

Parameters​

svc​

SupabaseClient

companyId​

string

msg​

EmailMessage

opts​

bcc?​

string[]

cc?​

string[]

process​

"invoice" | "recruiting" | "welcome" | "pipeline"

replyTo?​

string | null

Returns​

Promise<SendEmailResult>