Appearance
Function: getAttachmentsForEmail()
ts
function getAttachmentsForEmail(client: Client, emailId: string): Promise<any>;Defined in: src/ms-graph/outlook.ts:303
Get the attachments for an email message.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | The Microsoft Graph client. |
emailId | string | The ID of the email message. |
Returns
Promise<any>
A list of attachments.
Example
ts
const client = await getMsGraphClient(creds);
const attachments = await getAttachmentsForEmail(client, 'AAMkAD...');
console.log('Found', attachments.length, 'attachments');