Skip to content

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

ParameterTypeDescription
clientClientThe Microsoft Graph client.
messageIdstringThe ID of the email message.
newSubjectstringThe 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);

Matterway Assistant SDK Documentation