Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
ses_client
What it is
Part of shared infrastructure (transactional email). Outbound email
delivery: SES in dev/prod, local SMTP (Mailpit) when SMTP_HOST is set,
used by authentication_service for invite emails.
Start here
src/lib.rs:SesClient/Ses(aliased toMockSesClientunder#[cfg(test)]viamockall::automock) and theTransportenum that picks SES vs. SMTP.src/send_email.rs/src/send_email_smtp.rs: the two delivery paths.src/invite_user.rs: the invite email template and subject.
Scope
- Owns: choosing and driving the email transport, and the invite-email template.
- Not here: other transactional email templates (those compose their own HTML
and call
send_email).
Boundaries
- Depends on:
macro_env_var(theSMTP_HOST/SMTP_PORTescape hatch). - Used by:
authentication_service.
Recipes
- Send a new kind of email: build its HTML, call
Ses::send_email(orinvite_useras a template) — don't add a new transport branch per email kind.
Checks
cargo test -p ses_client(SQLX_OFFLINEunset).
Gotchas
#[cfg(test)] pub use MockSesClient as Sesmeans tests always get the mock; there is no way to exercise the realSesClienttype undercargo test.- The local SMTP transport is plaintext (
builder_dangerous) — never route through it outside local dev.
Related
- Rules:
.agents/rules/config-and-service-urls.md