> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundforge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mailgun

> Connect Mailgun email to the LangChain weather Agent.

<img src="https://mintcdn.com/groundforgeai/V4bCNZADLwZmOUhb/images/logos/mailgun.svg?fit=max&auto=format&n=V4bCNZADLwZmOUhb&q=85&s=e44f0beff51cba2ce8e643efff40199b" alt="Mailgun" width="190" height="52" data-path="images/logos/mailgun.svg" />

Complete [LangChain Agent Example](/examples/langchain-agent) and keep the Agent process running.

## 1. Create the Channel

In **Channels**, choose **Mailgun**. Enter the domain, API credential, webhook signing credential, response type, and From address. GroundForge verifies Mailgun signatures by default.

Attach the Channel to the weather Agent and publish the Agent.

## 2. Configure the callback

Copy the callback shown by GroundForge after publishing:

```text theme={null}
https://platform.groundforge.ai/v1/agents/{agent_id}/channels/{channel_id}/callback
```

Use it as the Mailgun Route destination.

> **Screenshot placeholder**\
> Add `/images/guides/mailgun-callback.png` showing the GroundForge callback and matching Mailgun Route.

## 3. Preview the delivery test

```bash theme={null}
gforge channels test <channel-id> \
  --to "<recipient@example.com>" \
  --subject "Weather request" \
  --body "What is the weather in Ottawa?" \
  --dry-run \
  -o yaml
```

## 4. Send the test

Run the same command without `--dry-run`.

## 5. Follow the request

Open **Traces** and confirm the email input, Agent execution, `get_weather`, Gateway decision, and final email delivery.

For signed callback troubleshooting:

```bash theme={null}
gforge channels signed-curl --help
```


## Related topics

- [Mailgun Inbound](/api-reference/endpoints/integrations/mailgun-inbound.md)
- [LangChain Agent Example](/examples/langchain-agent.md)
- [Channels](/concepts/channels.md)
- [Supported Features](/features.md)
