From 08251e2dd78e12cd6daaa29023fc61806ed79efb Mon Sep 17 00:00:00 2001 From: Lucas Fernandes da Costa Date: Fri, 26 Jun 2026 09:44:17 -0300 Subject: [PATCH] feat: add received_for to ReceivedEmail type Co-Authored-By: Claude Opus 4.8 (1M context) --- resend/emails/_received_email.py | 5 +++++ tests/receiving_async_test.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/resend/emails/_received_email.py b/resend/emails/_received_email.py index 4234257..c35a331 100644 --- a/resend/emails/_received_email.py +++ b/resend/emails/_received_email.py @@ -152,6 +152,10 @@ class _ReceivedEmailDefaultAttrs(_ReceivedEmailFromParam, BaseResponse): """ Reply-to addresses. """ + received_for: List[str] + """ + Addresses the email was received for (forwarding recipients). + """ message_id: str """ The message ID of the email. @@ -182,6 +186,7 @@ class ReceivedEmail(_ReceivedEmailDefaultAttrs): bcc (Optional[List[str]]): Bcc recipients. cc (Optional[List[str]]): Cc recipients. reply_to (Optional[List[str]]): Reply-to addresses. + received_for (List[str]): Addresses the email was received for (forwarding recipients). message_id (str): The message ID of the email. headers (NotRequired[Dict[str, str]]): Email headers. attachments (List[EmailAttachment]): List of attachments. diff --git a/tests/receiving_async_test.py b/tests/receiving_async_test.py index 85b1455..6a5b63c 100644 --- a/tests/receiving_async_test.py +++ b/tests/receiving_async_test.py @@ -20,6 +20,7 @@ async def test_receiving_get_async(self) -> None: "to": ["recipient@example.com"], "subject": "Test subject", "created_at": "2024-01-01T00:00:00Z", + "received_for": ["forwarded@example.com"], } ) @@ -28,6 +29,7 @@ async def test_receiving_get_async(self) -> None: ) assert email["id"] == "67d9bcdb-5a02-42d7-8da9-0d6feea18cff" assert email["object"] == "received_email" + assert email["received_for"] == ["forwarded@example.com"] async def test_should_get_receiving_async_raise_exception_when_no_content( self,