Bug Description
When sending emails via gog gmail send using service account impersonation (domain-wide delegation), the From header only contains the email address, not the display name configured in the send-as alias. This appears to be a gap in the fix from #93, which works for OAuth-authenticated accounts but not for service account auth.
Steps to Reproduce
-
Configure a service account with domain-wide delegation:
gog auth service-account set admin@example.com --key ~/service-account.json
-
Verify display name is configured for the account:
gog gmail sendas list --account admin@example.com --json
# Shows: "displayName": "Company Name", "isPrimary": true
-
Send an email using service account auth:
gog gmail send --account admin@example.com --to recipient@example.com --subject "Test" --body "Hello"
-
Recipient sees From as just the email address:
Expected Behavior
The From header should include the display name from the send-as alias:
From: Company Name <admin@example.com>
This matches the behavior for OAuth-authenticated accounts after #93.
Actual Behavior
Only the email address is included when using service account impersonation. The display name lookup that was added in #93 doesn't appear to run for service account auth paths.
Environment
- gog version: v0.9.0 (99d9575)
- OS: macOS (Darwin 25.2.0 arm64)
- Auth method: Service account with domain-wide delegation
Workaround
Currently none identified. The --from flag requires an exact match on registered send-as alias and doesn't accept display name format.
Related Issues
Bug Description
When sending emails via
gog gmail sendusing service account impersonation (domain-wide delegation), the From header only contains the email address, not the display name configured in the send-as alias. This appears to be a gap in the fix from #93, which works for OAuth-authenticated accounts but not for service account auth.Steps to Reproduce
Configure a service account with domain-wide delegation:
Verify display name is configured for the account:
gog gmail sendas list --account admin@example.com --json # Shows: "displayName": "Company Name", "isPrimary": trueSend an email using service account auth:
Recipient sees From as just the email address:
Expected Behavior
The From header should include the display name from the send-as alias:
This matches the behavior for OAuth-authenticated accounts after #93.
Actual Behavior
Only the email address is included when using service account impersonation. The display name lookup that was added in #93 doesn't appear to run for service account auth paths.
Environment
Workaround
Currently none identified. The
--fromflag requires an exact match on registered send-as alias and doesn't accept display name format.Related Issues
gmail senddoesn't include display name in From header #87 (original display name issue, closed)