Skip to content
Back to skills

Sending Emails

ASecurity

Send emails via Gmail API using FastMCP server with approval workflows. Use when configuring email sending, troubleshooting email delivery, setting up email templates, or managing email rate limits. NOT when reading emails (use watching-gmail skill). NOT when categorizing emails (use watching-gmail skill).

  • 12 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
ai-agentspythongobashgitapi

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add AbdullahMalik17/Digital-FTE --skill sending-emails --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sending Emails?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sending Emails
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/abdullahmalik17-sending-emails/badge)](https://www.skillsdirectory.com/skills/abdullahmalik17-sending-emails)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sending-emails
description: |
  Send emails via Gmail API using FastMCP server with approval workflows.
  Use when configuring email sending, troubleshooting email delivery,
  setting up email templates, or managing email rate limits.
  NOT when reading emails (use watching-gmail skill).
  NOT when categorizing emails (use watching-gmail skill).
---

# Email Sender MCP Skill

FastMCP server for sending emails via Gmail API.

## Quick Start

```bash
# Start MCP server
python src/mcp_servers/email_sender.py

# Or via scripts
python scripts/run.py
```

## MCP Tools

1. `send_email(to, subject, body, cc, bcc, requires_approval)` - Send or queue email
2. `send_from_template(template_name, to, variables, requires_approval)` - Template-based send
3. `archive_email(message_id)` - Archive sent email

## Production Gotchas ⚠️

### Cloud Mode Forces Approval
When `FTE_ROLE=cloud`, ALL emails are forced to approval workflow regardless of `requires_approval` flag:
```python
if role == "cloud":
    requires_approval = True  # Always enforced
```

### Recipient Limit (FR-003)
Maximum 5 total recipients (to + cc + bcc combined). Exceeding returns error:
```
Error: Recipient limit exceeded. Max 5 allowed, got {count}.
```

### Separate Token Files
Sending requires **different token** than reading:
- `token_email.json` - For sending (gmail.send scope)
- `token.json` - For reading (gmail.readonly scope)

### Template Subject Required
When using `send_from_template`, variables MUST include `subject`:
```python
# ✗ FAILS
send_from_template("welcome.j2", "user@example.com", {"name": "John"})

# ✓ WORKS
send_from_template("welcome.j2", "user@example.com", {"name": "John", "subject": "Welcome!"})
```

### Rate Limit Fail-Safe
When audit log read fails, rate limiting **blocks** (fail-safe):
```python
except Exception:
    return False  # Block on error, not allow
```

## Rate Limits

| Limit | Value |
|-------|-------|
| Hourly | 10 emails |
| Daily | 100 emails |

Tracked via `Vault/Logs/email_audit_log.md`.

## Approval Workflow

Set `requires_approval=True` to queue email for human review.

Approval files created in `Vault/Pending_Approval/`:
- Move to `Vault/Approved/` to send
- Delete to reject

## Configuration

Required in `config/`:
- `credentials.json` - Google OAuth credentials
- `token_email.json` - Gmail send token (separate from read)

Templates directory: `src/templates/email/`

## Environment Variables

```bash
FTE_ROLE=local|cloud  # cloud forces approval for all sends
```

## Verification

Run: `python scripts/verify.py`

## Related Skills

- `watching-gmail` - Read and categorize incoming emails
- `digital-fte-orchestrator` - Approval workflow processing

Files in this skill

  • SKILL.md2.8 KB
  • scripts/run.py308 B
  • scripts/verify.py807 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.