跳到正文
所有工具

m365_move_email

Microsoft 365 · macOS · Windows

效果: 写入. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

当用户想把其 Microsoft 365 / Outlook 账户中的邮件移动到 Exchange 服务器上的另一个文件夹,以便归档、存档或整理时使用。用 message_id(一封)或 message_ids(最多 50 封)指定邮件,来自 m365_list_emails、m365_search_emails 或 m365_read_email;或用 conversation_id(来自 m365_list_emails 或 m365_search_emails)指定整个会话:此时只移动其位于 source_folder(默认 inbox)中的邮件,绝不移动其在 Sent Items、Drafts 或其他文件夹中的副本,除非 all_folders=true。destination 是来自 m365_list_email_folders 的文件夹 id、名称或路径,或 inbox、archive、deleteditems、junkemail。先显示预览——设置 confirm=true 才会移动。只有当第二次读取显示邮件已在目标文件夹中、且不再位于旧 id 时,才算已移动;已移动的邮件会获得新的 id(new_id)。需要 Microsoft 365 权限 Mail.ReadWrite:在请求该权限之前连接的账户,会答复 consent_required,直到重新连接。对于 Mac 邮件应用中的邮件,请使用 move_email。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "all_folders": {
      "description": "With conversation_id: true moves its messages from every folder, Sent Items and Drafts included (default false).",
      "type": "boolean"
    },
    "confirm": {
      "description": "Set to true to move (default: shows a preview only).",
      "type": "boolean"
    },
    "conversation_id": {
      "description": "Move the messages of this conversation that are in source_folder.",
      "type": "string"
    },
    "destination": {
      "description": "The folder to move them to: an id, name or path from m365_list_email_folders, or inbox, archive, deleteditems, junkemail.",
      "type": "string"
    },
    "message_id": {
      "description": "The ID of one message to move.",
      "type": "string"
    },
    "message_ids": {
      "description": "IDs of up to 50 messages to move.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source_folder": {
      "description": "With conversation_id: the folder its messages are moved from (default inbox). An id, name or path.",
      "type": "string"
    }
  },
  "required": [
    "destination"
  ],
  "type": "object"
}

文档示例

m365_move_email 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "destination": "archive",
  "message_id": "demo-message-001"
}

Windows

用途

当用户想把其 Microsoft 365 / Outlook 账户中的邮件移动到 Exchange 服务器上的另一个文件夹,以便归档、存档或整理时使用。用 message_id(一封)或 message_ids(最多 50 封)指定邮件,来自 m365_list_emails、m365_search_emails 或 m365_read_email;或用 conversation_id(来自 m365_list_emails 或 m365_search_emails)指定整个会话:此时只移动其位于 source_folder(默认 inbox)中的邮件,绝不移动其在 Sent Items、Drafts 或其他文件夹中的副本,除非 all_folders=true。destination 是来自 m365_list_email_folders 的文件夹 id、名称或路径,或 inbox、archive、deleteditems、junkemail。先显示预览——设置 confirm=true 才会移动。只有当第二次读取显示邮件已在目标文件夹中、且不再位于旧 id 时,才算已移动;已移动的邮件会获得新的 id(new_id)。需要 Microsoft 365 权限 Mail.ReadWrite:在请求该权限之前连接的账户,会答复 consent_required,直到重新连接。对于这台电脑上经典 Outlook 应用中的邮件,请使用 outlook_move_email。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "account": {
      "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      "type": "string"
    },
    "all_folders": {
      "description": "With conversation_id: true moves its messages from every folder, Sent Items and Drafts included (default false).",
      "type": "boolean"
    },
    "confirm": {
      "description": "Set to true to move (default: shows a preview only).",
      "type": "boolean"
    },
    "conversation_id": {
      "description": "Move the messages of this conversation that are in source_folder.",
      "type": "string"
    },
    "destination": {
      "description": "The folder to move them to: an id, name or path from m365_list_email_folders, or inbox, archive, deleteditems, junkemail.",
      "type": "string"
    },
    "message_id": {
      "description": "The ID of one message to move.",
      "type": "string"
    },
    "message_ids": {
      "description": "IDs of up to 50 messages to move.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source_folder": {
      "description": "With conversation_id: the folder its messages are moved from (default inbox). An id, name or path.",
      "type": "string"
    }
  },
  "required": [
    "destination"
  ],
  "type": "object"
}

文档示例

m365_move_email 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "destination": "archive",
  "message_id": "demo-message-001"
}