Skip to main content
Glama

set_email_forward

Configure email forwarding for a domain to redirect messages to existing addresses or set up custom MX records for mail routing.

Instructions

Set email forwarding for a domain. Forward emails to existing email addresses or configure MX records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to configure email forwarding for
paramsYesEmail forwarding parameters. Keys: forward_type ('forward'/'mx'), username0/exist_email0 (for forward type), mx_host0/mx_priority0 (for mx type)

Implementation Reference

  • The tool definition and handler logic for set_email_forward, which processes the input parameters and calls the client service.
    server.tool(
      "set_email_forward",
      "Set email forwarding for a domain. Forward emails to existing email " +
        "addresses or configure MX records.",
      {
        domain: z.string().describe("Domain name to configure email forwarding for"),
        params: z
          .record(z.string())
          .describe(
            "Email forwarding parameters. Keys: forward_type ('forward'/'mx'), " +
              "username0/exist_email0 (for forward type), " +
              "mx_host0/mx_priority0 (for mx type)"
          ),
      },
      async ({ domain, params }) => {
        try {
          const result = await client.setEmailForward(domain, params);
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to set email forwarding: ${msg}` },
            ],
            isError: true,
          };
        }
      }
  • The underlying service method that executes the API call to set email forwarding.
    async setEmailForward(domain: string, emailParams: Record<string, string>): Promise<DynadotResponse> {
      return this.call("set_email_forward", { domain, ...emailParams });
    }

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/mikusnuz/dynadot-mcp'

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