Appearance
Function: updateEmailSubject()
ts
function updateEmailSubject(
client: Client,
messageId: string,
newSubject: string): Promise<any>;Defined in: src/ms-graph/outlook.ts:241
Update the subject of an email message.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | The Microsoft Graph client. |
messageId | string | The ID of the email message. |
newSubject | string | The new subject line. |
Returns
Promise<any>
The updated message object.
Example
ts
const client = await getMsGraphClient(creds);
const updated = await updateEmailSubject(client, 'AAMkAD...', 'Re: Lunch Plans (Updated)');
console.log('Subject changed to:', updated.subject);