Skip to content

docs(cryptify): document staging_mode config option that bypasses SMTP #84

@dobby-coder

Description

@dobby-coder

Cryptify added a new staging_mode boolean to CryptifyConfig. When true, send_email skips SMTP entirely and writes a single [STAGING] Email NOT sent ... log line containing the full intended recipients, sender, sender_attributes, expiry, download URL, and uuid. The upload finalize flow completes normally.

Source PR

encryption4all/cryptify#152feat: staging_mode that logs email instead of sending it (merged 2026-05-13). Closes encryption4all/postguard#174.

What needs documenting in docs/repos/cryptify.md

Add staging_mode to the configuration parameters table near the existing SMTP settings:

Parameter Description Example
staging_mode When true, send_email skips SMTP entirely and logs the intended email metadata at info level. The upload finalize still returns Ok. Defaults to false. Intended for staging deploys where real email delivery is undesirable. false

A short subsection (or note) should explain:

  • How to enable: set staging_mode = true in the active config file (e.g. conf/config.toml).
  • What gets logged: a single [STAGING] Email NOT sent (staging_mode=true). Would have notified recipients=[...] from sender=... attributes=[...] lang=... expires=... confirm=... notify_recipients=... download_url=... uuid=... line.
  • SMTP settings (smtp_url, smtp_port, smtp_username, smtp_password, smtp_tls) are ignored when staging_mode is on, so they can stay unset in a staging environment.

The <small>[Source: src/config.rs#L15-L53]</small> link below the table should be updated to point at the cryptify commit that introduced the field.

Verification

  • Cross-check src/config.rs and src/email.rs at the merge commit of cryptify#152 for the exact field name, default, and log format.
  • Run npx vitepress build docs.
  • Style: align with postguard-docs/CLAUDE.md (no em dashes, minimal bold, no banned words).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions