Skip to main content
Glama
r3-yamauchi

blastengine-mailer

by r3-yamauchi

send_email

Send emails via the Blastengine API by specifying recipient, sender, subject, and body. Simplify email communication directly from your application or workflow.

Instructions

Send an email using Blastengine API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSender email address
subjectYesEmail subject
textYesEmail body
toYesRecipient email address

Implementation Reference

  • server.js:56-96 (handler)
    The handler function for the 'send_email' tool, which uses BlastEngine to send emails based on input parameters.
    case "send_email": { const to = String(request.params.arguments?.to); const from = String(request.params.arguments?.from); const subject = String(request.params.arguments?.subject); const text = String(request.params.arguments?.text); if (!to || !from || !subject || !text) { throw new Error("宛先、送信元、件名、本文は必須です。"); } try { // BlastEngineクライアントの初期化 const client = new BlastEngine(process.env.BLASTENGINE_USER_ID, process.env.BLASTENGINE_API_KEY); // メールの送信 const transaction = new Transaction; transaction .setFrom(from) .setSubject(subject) .setTo(to) .setText(text); const res = await transaction.send(); return { content: [{ type: "text", text: `${to} にメールを送信しました。 delivery_id: ${res.delivery_id}` }], }; } catch (error) { console.error("メール送信エラー:", error); return { content: [ { type: "text", text: `${to} へのメール送信に失敗しました: ${error.message}`, }, ], isError: true, }; } }
  • Input schema defining the parameters for the 'send_email' tool.
    inputSchema: { type: "object", properties: { to: { type: "string", description: "Recipient email address" }, from: { type: "string", description: "Sender email address" }, subject: { type: "string", description: "Email subject" }, text: { type: "string", description: "Email body" } }, required: ["to", "from", "subject", "text"] }
  • server.js:24-50 (registration)
    Registration of the 'send_email' tool in the ListToolsRequestSchema response.
    { name: "send_email", description: "Send an email using Blastengine API", inputSchema: { type: "object", properties: { to: { type: "string", description: "Recipient email address" }, from: { type: "string", description: "Sender email address" }, subject: { type: "string", description: "Email subject" }, text: { type: "string", description: "Email body" } }, required: ["to", "from", "subject", "text"] } } ]

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/r3-yamauchi/mcp-server-blastengine-mailer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server