> This page location: Functions > Templates > Send emails with AI Inbx
> Full Neon documentation index: https://neon.com/docs/llms.txt

# Send emails with AI Inbx

Send email from your domains or connected Gmail and Outlook mailboxes, and follow up in the same thread, schedule it, or draft it for review.

- Community: written by the community
- Built by: [AI Inbx](https://aiinbx.com/)
- Categories: Community, Email

## Install

```bash
neon functions new aiinbx
```

## What this function exposes

After you deploy, call these paths on the function URL.

### Send an email (recommended)

POST an AI Inbx send request: from, to, subject, and html or text; optionally thread\_id to follow up, scheduled\_at to send later, or draft to hold it for review.

- Route: `/send-email`
- Install only this operation: `neon functions new aiinbx --operation send-email`

## Environment variables

The CLI declares these variables in `neon.ts` and adds them to `.env.example` without values, so you need to fill in the required ones before you run the function.

| Variable | Description | Required |
| --- | --- | --- |
| `AI_INBX_API_KEY` | API key from aiinbx.com/app with the sending scope. Keep this server-side. | Yes |
| `AI_INBX_FUNCTION_TOKEN` | Random token (at least 32 characters, for example from openssl rand -hex 32) callers send as Authorization: Bearer \<token\>; required because Neon Function URLs are public. | Yes |

## Run it

Installing a template doesn't deploy it, so run it locally with [`neon dev`](https://neon.com/docs/cli/dev.md) first, and deploy it to a branch with [`neon deploy`](https://neon.com/docs/compute/functions/deploy.md) once it works.

## Related

- Previous: [OpenAI Agents SDK starter](https://neon.com/functions/templates/openai-agents.md)
- Next: [Sentry-instrumented API](https://neon.com/functions/templates/sentry.md)
- [All templates](https://neon.com/functions/templates.md)
- [Template source](https://github.com/neondatabase/examples/tree/main/registry/aiinbx)
- [Use function templates](https://neon.com/docs/compute/functions/templates.md)
- [Contribute a function template](https://neon.com/docs/compute/functions/registry.md)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/functions/templates/aiinbx"}` to https://feedback.neon.tech/ (no auth required).