send_email
Send emails directly from applications using SMTP protocol. Specify recipient, subject, and body to dispatch messages through the Email MCP Server.
Instructions
이메일을 발송합니다.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>",
"subject": "<subject>",
"body": "<body>"
},
"name": "send_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | 수신자 이메일 주소 | |
| subject | Yes | 제목 | |
| body | Yes | 본문 (텍스트) |
Implementation Reference
- src/send-tools.ts:22-41 (handler)The handler logic for the 'send_email' tool, which validates the tool name and uses nodemailer to send the email.
if (toolName !== "send_email") { return { content: [{ type: "text" as const, text: `Unknown tool: ${toolName}` }], isError: true }; } try { const { to, subject, body } = args as { to: string; subject: string; body: string }; const transporter = nodemailer.createTransport({ host: smtpConfig.host, port: smtpConfig.port, secure: true, auth: { user: smtpConfig.user, pass: smtpConfig.password }, }); await transporter.sendMail({ from: smtpConfig.user, to, subject, text: body }); return { content: [{ type: "text" as const, text: `이메일 발송 완료: "${subject}" → ${to}` }], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: "text" as const, text: `발송 오류: ${msg}` }], isError: true }; } }; - src/send-tools.ts:5-17 (schema)The schema definition for the 'send_email' tool, specifying input arguments.
{ name: "send_email", description: "이메일을 발송합니다.", inputSchema: { type: "object" as const, properties: { to: { type: "string", description: "수신자 이메일 주소" }, subject: { type: "string", description: "제목" }, body: { type: "string", description: "본문 (텍스트)" }, }, required: ["to", "subject", "body"], }, },