Skip to content

Add CC field to email object (fixes #142)#148

Merged
levz0r merged 1 commit into
masterfrom
feature/issue-142-cc-bcc-support
Dec 4, 2025
Merged

Add CC field to email object (fixes #142)#148
levz0r merged 1 commit into
masterfrom
feature/issue-142-cc-bcc-support

Conversation

@levz0r
Copy link
Copy Markdown
Owner

@levz0r levz0r commented Dec 4, 2025

Summary

Adds CC (Carbon Copy) support to the email object returned by check_inbox() and get_messages().

Fixes #142

Changes

  • Extract Cc header from Gmail API response
  • Add cc optional field to Email TypeScript interface

Why no BCC?

BCC (Blind Carbon Copy) cannot be implemented because it's stripped by email protocol design (RFC2822). The BCC header is only visible in the sender's "Sent" folder, never in received emails. Since gmail-tester is primarily used to check inbox for received emails, BCC would always be undefined.

Usage

const emails = await gmail.get_messages(credentials, token, options);
console.log(emails[0].cc); // "user1@example.com, user2@example.com" or undefined

Test plan

  • All existing tests pass
  • CI passes

🤖 Generated with Claude Code

- Extract Cc header from Gmail API response
- Add cc optional field to Email TypeScript interface

Note: BCC cannot be implemented as it's stripped by email protocol
(RFC2822) - only visible in sender's Sent folder, not in received emails.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@levz0r levz0r merged commit ab4e1dd into master Dec 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to get carbon copy(CC) and Blind Carbon copy (BCC) details

1 participant