Logo di Mailgun Setup

Mailgun Setup

OrganizzazionePopolare
vellum-ai
mailgun-setup

Set up and send emails via a user-provided Mailgun account (BYO email provider)

Panoramica

Pubblicato davellum-ai
Repositoryvellum-assistant
Nome della skillmailgun-setup
Stelle
1.3K
Fork
186
File inclusi
4
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da vellum-ai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Mailgun Setup in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/vellum-ai/vellum-assistant/tree/main/skills/mailgun-setup
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vellum-ai/vellum-assistant.git /tmp/vellum-assistant
mkdir -p .claude/skills
cp -r /tmp/vellum-assistant/skills/mailgun-setup .claude/skills/mailgun-setup
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Mailgun Setup in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Mailgun Setup non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Mailgun Setup non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Overview

Send emails through the user's own Mailgun account. The user provides their Mailgun API key and domain, and you send via their infrastructure.

Setup

Step 0: Check Existing Configuration

Before starting, check whether Mailgun is already configured:

bash
bun skills/mailgun-setup/scripts/check-config.ts

The script outputs JSON: { "configured": boolean, "hasApiKey": boolean, "hasWebhookKey": boolean, "details": string }.

  • If configured is true — Mailgun is already set up. Offer to verify the connection or reconfigure.
  • If configured is false — continue to Step 1.

Step 1: Store the API Key

Run the store script to securely collect the API key:

bash
bun skills/mailgun-setup/scripts/store-api-key.ts

The script opens a secure credential prompt, stores the key, and exits. If it exits 0, the key is stored. Exit code 130 means the user cancelled the prompt — nothing was stored; that's a valid choice, not an error, so ask whether they'd like to try again rather than treating it as a failure. Any other non-zero exit is a real failure. Never ask for the key in chat.

Note: Mailgun uses HTTP Basic Auth with username api and the API key as the password. The credential proxy cannot construct Basic Auth headers automatically. Instead, use curl -u "api:$KEY" in bash commands — retrieve the key from the vault at runtime. See the sending examples below.

Step 2: Detect the Domain

After storing the API key, automatically detect the user's domain — don't ask them for it. Retrieve the API key from the vault and call the Mailgun Domains API:

bash
curl -s --user "api:$MAILGUN_API_KEY" \
  https://api.mailgun.net/v4/domains?state=active

The response contains an items array of domain objects with name and state fields. Pick the first domain with "state": "active". If no active domains are found, try the EU endpoint (https://api.eu.mailgun.net/v4/domains?state=active). If still none, tell the user they need to verify a domain in their Mailgun dashboard first.

Use hi@<domain> as the default sender address. Remember the domain and region (US/EU) for future sends.

Step 3: Verify the Connection

Confirm the API key works by checking the domain response returned in Step 2. A successful response (HTTP 200) with domain data confirms the connection.

Step 4: Webhook Setup (for receiving email)

If the user also wants to receive emails via Mailgun, run the webhook setup script:

bash
bun skills/mailgun-setup/scripts/setup-webhook.ts --domain "<verified domain>" [--region eu]

This script:

  1. Registers a callback URL via the webhooks system
  2. Creates an inbound route in Mailgun via their API
  3. Prompts the user for their webhook signing key (found in the Mailgun dashboard: Settings > API Security > HTTP Webhook Signing Key)

If the script fails because no public base URL is configured (self-hosted only), load the public-ingress skill to walk the user through setting one up, then retry.

Step 5: Report Success

Summarize with the completed checklist:

"Setup complete! ✅ API key configured ✅ Domain detected: <domain> (region: US/EU) ✅ Connection verified {webhook_line}

Default sender: hi@<domain>"

For {webhook_line}:

  • If webhook was set up: ✅ Inbound route and webhook signing key configured
  • If skipped: ⬜ Webhook — run setup again to enable inbound email

Sending Email

Use bash with curl to call the Mailgun API. Pass the API key via -u for Basic Auth:

bash
curl -s --user "api:$MAILGUN_API_KEY" \
  https://api.mailgun.net/v3/DOMAIN/messages \
  -F from="Name <sender@example.com>" \
  -F to="recipient@example.com" \
  -F subject="Hello" \
  -F text="Plain text body" \
  -F html="<p>HTML body</p>"

Replace DOMAIN with the user's Mailgun sending domain.

API Parameters

ParameterTypeRequiredDescription
fromstring✅Sender address ("Name <email>" format)
tostring✅Recipient(s), comma-separated for multiple
subjectstring✅Email subject
textstringPlain text body
htmlstringHTML body
ccstringCC recipients, comma-separated
bccstringBCC recipients, comma-separated
h:Reply-TostringReply-to address
h:In-Reply-TostringMessage-ID of parent (for threading)
h:ReferencesstringSpace-separated chain of ancestor Message-IDs

Threading (replies)

To reply in a thread, include custom headers:

bash
curl -s --user "api:$MAILGUN_API_KEY" \
  https://api.mailgun.net/v3/DOMAIN/messages \
  -F from="bot@example.com" \
  -F to="user@example.com" \
  -F subject="Re: Original subject" \
  -F text="Reply body" \
  -F "h:In-Reply-To=<original-message-id>" \
  -F "h:References=<original-message-id>"

Response

Success returns { "id": "<message-id>", "message": "Queued. Thank you." } with HTTP 200.

Errors return { "message": "error description" } with 4xx/5xx status.

Regions

Mailgun has US and EU regions:

  • US (default): https://api.mailgun.net/v3/DOMAIN/messages
  • EU: https://api.eu.mailgun.net/v3/DOMAIN/messages

Ask the user which region their account uses if sends fail with 401.

Important Notes

  • The from address must be from the user's verified Mailgun domain.
  • Default sender address is hi@<domain> — use this unless the user specifies otherwise.
  • Always confirm with the user before sending — never send without explicit permission.
  • Use text for plain text, html for rich formatting. Provide both when possible.
  • Mailgun's free tier allows 100 emails/day. Paid plans have higher limits.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Mailgun Setup?

Set up and send emails via a user-provided Mailgun account (BYO email provider)

Perché usare Mailgun Setup su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Mailgun Setup è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Mailgun Setup in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/vellum-ai/vellum-assistant/tree/main/skills/mailgun-setup. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Mailgun Setup?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Mailgun Setup?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Mailgun Setup: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Mailgun Setup è gratuita?

Sì. È pubblicata su GitHub da vellum-ai con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇