Summary
When sending emails via gog gmail send, the From header only contains the bare email address (e.g., bemiagent@gmail.com) instead of including the display name configured in Gmail's "Send mail as" settings (e.g., "Bé Mi Agent" <bemiagent@gmail.com>).
Steps to Reproduce
- Configure a display name in Gmail Settings → Accounts → "Send mail as"
- Send an email using gog:
gog gmail send -a bemiagent@gmail.com --to recipient@gmail.com --subject "Test" --body "Hello"
- Check the received email's
From header
Expected Behavior
The From header should include the display name from Gmail's Send-As settings:
From: "Bé Mi Agent" bemiagent@gmail.com
Actual Behavior
The From header only contains the bare email:
From: bemiagent@gmail.com
Sending the same email manually from Gmail web UI correctly shows the display name.
Workaround
Using the raw Gmail API (messages.send with a base64-encoded RFC 2822 message that includes the display name in the From header) works correctly.
Possible Fix
Before calling messages.send, gog could:
- Fetch the user's Send-As settings via
GET /gmail/v1/users/me/settings/sendAs to get the configured display name
- Include the display name in the raw message's
From header using RFC 2822 format: "Display Name" <email@example.com>
Alternatively, a --from-name flag could allow users to specify the display name explicitly.
Environment
- gog version: v0.10.0 (a92bd63 2026-02-14)
- OS: macOS (ARM64)
- Account type: Personal Gmail