Fetch mails in a paginated manner for a specific receiver. This can be helpful when dealing with a large number of mails, as it allows you to load and process a manageable number of mails at a time.
const receiver = '0x...'; const pageNumber = 1n; const pageSize = 10n; const receivedEnvelopes = await mail.fetchAll(receiver, pageNumber, pageSize);
A promise that resolves to an array of received mail Envelopes.
The mail receiver's address.
The number of the page to be fetched.
The size of the page (i.e., the number of mails per page).