msexchange-mcp
Version:
MCP server for Microsoft Exchange/Outlook email operations via Microsoft Graph API
100 lines • 2.97 kB
TypeScript
import { Email } from '../types.js';
export declare class MailService {
private userEmail;
constructor(userEmail: string);
private retryWithBackoff;
queryEmails(options: {
search?: string;
filter?: string;
top?: number;
skip?: number;
orderBy?: string;
select?: string[];
}): Promise<Email[]>;
getEmailById(messageId: string): Promise<Email>;
moveEmail(messageId: string, destinationFolderId: string): Promise<Email>;
updateEmail(messageId: string, updates: {
isRead?: boolean;
categories?: string[];
}): Promise<Email>;
listFolders(): Promise<any[]>;
createFolder(folderData: {
displayName: string;
parentFolderId?: string;
}): Promise<any>;
createDraft(draft: {
subject: string;
body: {
contentType: 'Text' | 'HTML';
content: string;
};
toRecipients?: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
ccRecipients?: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
bccRecipients?: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
attachments?: Array<{
'@odata.type': '#microsoft.graph.fileAttachment';
name: string;
contentType?: string;
contentBytes: string;
}>;
}): Promise<Email>;
addAttachmentToDraft(messageId: string, attachment: {
name: string;
contentType?: string;
contentBytes: string;
size?: number;
}): Promise<any>;
sendMail(message: {
subject: string;
body: {
contentType: 'Text' | 'HTML';
content: string;
};
toRecipients: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
ccRecipients?: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
bccRecipients?: Array<{
emailAddress: {
address: string;
name?: string;
};
}>;
attachments?: Array<{
'@odata.type': '#microsoft.graph.fileAttachment';
name: string;
contentType?: string;
contentBytes: string;
}>;
}, saveToSentItems?: boolean): Promise<void>;
deleteEmail(messageId: string): Promise<void>;
listMailRules(): Promise<any[]>;
createMailRule(ruleData: any): Promise<any>;
getMailRule(ruleId: string): Promise<any>;
updateMailRule(ruleId: string, updateData: any): Promise<any>;
deleteMailRule(ruleId: string): Promise<void>;
}
//# sourceMappingURL=mailService.d.ts.map