Default sender when an account has several send-as addresses

Open
#479 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start with the hey account senders, hey compose, and hey reply command entry points, then trace how sender selection and per-account settings are stored. Verify the sender list can show a default, the default command persists it, and compose or reply uses it when --from is omitted. Done means ambiguous multiple-sender cases fail with a structured error directing callers to choose a sender or set a default.

Written by the indexing model from the issue text.

Description

Context

#353 added hey compose --from, and that flag works: the CLI resolves a configured sender and sends with its id. What is still missing is a default.

hey account senders can list several addresses with none marked default, and the active account selection can be all. A compose that omits --from then depends on whichever identity the CLI picks. Scripts that pass --from on every call are safe. Anything that forgets the flag is not, and there is no way to set the sender once for an account.

This is not about connecting a new SMTP sender (#454) and not about search failing to find mail sent as an alias (#470).

No account-specific details below.

Ask

  • hey account senders shows which sender is the default, if one is set.
  • A command sets that default per account, for example hey account senders default <id-or-email>.
  • hey compose and hey reply use that default when --from is omitted.
  • When no default is set and more than one sender exists, compose fails with a structured error telling the caller to pass --from or set a default. Do not silently pick one.

Why it matters

Automation should fail closed when the From address is ambiguous, and should not have to repeat the sender id on every call once a default is chosen.

Related: #353 (closed), #454, #470.

Dominant language
Go
Stars
376
Forks
44
Avg merge
1d 5h
Merged PRs (30d)
130

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from basecamp/hey-cli

All issues in basecamp/hey-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.