Skip to main content

Method

func (s *ReceivingSvcImpl) List() (ListReceivedEmailsResponse, error)
func (s *ReceivingSvcImpl) ListWithContext(ctx context.Context) (ListReceivedEmailsResponse, error)
func (s *ReceivingSvcImpl) ListWithOptions(ctx context.Context, options *ListOptions) (ListReceivedEmailsResponse, error)
Access via: client.Emails.Receiving.List()

Parameters

options
*ListOptions
Pagination options (only available in ListWithOptions)
Limit
*int
Maximum number of emails to return
After
*string
Cursor for forward pagination
Before
*string
Cursor for backward pagination

Response

Object
string
Always "list"
HasMore
bool
Whether there are more results available
Data
[]ListReceivedEmail
Array of received email objects
Id
string
The unique identifier of the email
To
[]string
Array of recipient email addresses
From
string
The sender’s email address
CreatedAt
string
ISO 8601 timestamp of when the email was received
Subject
string
The email subject line
Bcc
[]string
Array of BCC recipient addresses
Cc
[]string
Array of CC recipient addresses
ReplyTo
[]string
Array of reply-to addresses
MessageId
string
The email message ID
Attachments
[]ReceivedAttachment
Array of attachment metadata (without download URLs)

Example

client := resend.NewClient("re_123456789")

response, err := client.Emails.Receiving.List()
if err != nil {
    panic(err)
}

for _, email := range response.Data {
    fmt.Printf("Email: %s\n", email.Subject)
    fmt.Printf("  From: %s\n", email.From)
    fmt.Printf("  To: %v\n", email.To)
    fmt.Printf("  Received: %s\n", email.CreatedAt)
}

fmt.Println("Has More:", response.HasMore)

Build docs developers (and LLMs) love