Skip to content

Let the mail transport be chosen instead of hardcoded #116

Description

@SirLouen

Only one mail transport can ever run, because the composition root names it directly. A second transport is unreachable wherever its code lives.

Current state: buildMailSender in cmd/alphone/mail.go:33 calls smtp.New unconditionally, and the only choice is whether an SMTP host is set. Settings are read once from the environment at boot. The sdk declares MailSenderConsumer, which hands a sender down to plugins, and no seam pointing the other way, although wireFieldProviders and wireCredentialProviders in cmd/alphone/run.go already collect from plugins that way.

Proposal: pick the transport from configuration first, and add the missing provider seam. A selector in the settings screen follows once settings move to a table.

Trigger: before a second transport ships.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions