mailosaur_messages_forward
Forward a specific email message by its ID to a verified address, including optional CC, text, or HTML.
Instructions
Forward an email message to a verified address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message ID. | |
| to | Yes | ||
| cc | No | ||
| text | No | ||
| html | No |
Implementation Reference
- src/index.ts:205-208 (handler)The handler function for the 'mailosaur_messages_forward' tool. It receives the message ID and forward options (to, cc, text, html), calls mailosaur.messages.forward() with them, and returns the result via the response helper.
async ({ id, ...options }) => { const result = await mailosaur.messages.forward(id, options); return response(result); } - src/index.ts:198-203 (schema)Input schema (Zod object) for the 'mailosaur_messages_forward' tool, defining the required 'id' and 'to' fields, and optional 'cc', 'text', and 'html' fields.
{ id: z.string().describe("Message ID."), to: z.string(), cc: z.string().optional(), text: z.string().optional(), html: z.string().optional() - src/index.ts:195-209 (registration)Registration of the 'mailosaur_messages_forward' tool on the MCP server via server.tool(), with its name, description, schema, and handler.
server.tool( "mailosaur_messages_forward", "Forward an email message to a verified address.", { id: z.string().describe("Message ID."), to: z.string(), cc: z.string().optional(), text: z.string().optional(), html: z.string().optional() }, async ({ id, ...options }) => { const result = await mailosaur.messages.forward(id, options); return response(result); } ); - src/index.ts:79-87 (helper)The 'response' helper function used by the handler to format the result as MCP text content.
function response(value: unknown) { return { content: [ { type: "text" as const, text: JSON.stringify(value, null, 2) } ] };