# email > Send emails via SMTP using the Claude API Server email endpoints. - Author: MomoQuilar - Repository: DSI-AI/dsi-jarvis - Version: 20260209135651 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-09 - Source: https://github.com/DSI-AI/dsi-jarvis - Web: https://mule.run/skillshub/@@DSI-AI/dsi-jarvis~email:20260209135651 --- --- name: email description: Send emails via SMTP and manage email configuration. Use when the user wants to send automated reports, notifications, or other email communications. argument-hint: [action] [parameters] allowed-tools: Bash, Read, Write --- # Email Skill Send emails via SMTP using the Claude API Server email endpoints. ## Prerequisites The following environment variables must be set for email functionality: | Variable | Required | Description | Example | |----------|----------|-------------|---------| | `EMAIL_HOST` | Yes | SMTP server hostname | `smtp.gmail.com` | | `EMAIL_PORT` | No | SMTP port (default: 587) | `587` | | `EMAIL_SECURE` | No | Use TLS (default: false) | `true` | | `EMAIL_USER` | Yes | SMTP username/email | `jarvis.aajour@gmail.com` | | `EMAIL_PASS` | Yes | SMTP password or app password | `app-specific-password` | | `EMAIL_FROM` | No | From address (default: EMAIL_USER) | `JARVIS ` | ## API Endpoints All endpoints are on the Claude API Server (`http://localhost:3333`). ### POST /email/send Send an email via SMTP. **Request:** ```json { "to": "recipient@example.com", "subject": "Subject line", "text": "Plain text body", "html": "

HTML body

", "cc": "cc@example.com", "bcc": "bcc@example.com", "attachments": [] } ``` **Parameters:** | Field | Type | Required | Description | |-------|------|----------|-------------| | `to` | string or array | Yes | Recipient email address(es) | | `subject` | string | Yes | Email subject line | | `text` | string | No* | Plain text email body | | `html` | string | No* | HTML email body | | `cc` | string or array | No | CC recipients | | `bcc` | string or array | No | BCC recipients | | `attachments` | array | No | File attachments | *Either `text` or `html` is required. **Response:** ```json { "success": true, "messageId": "abc123@server.com", "info": { "accepted": ["recipient@example.com"], "rejected": [], "response": "250 OK" } } ``` ### GET /email/status Check email configuration status. **Response:** ```json { "configured": true, "host": "smtp.gmail.com", "port": 587, "secure": false, "from": "jarvis.aajour@gmail.com", "transporterReady": true } ``` If not configured: ```json { "configured": false, "missing": ["EMAIL_HOST", "EMAIL_USER", "EMAIL_PASS"] } ``` ## Common Use Cases ### Send a Simple Text Email ```bash curl -X POST http://localhost:3333/email/send \ -H "Content-Type: application/json" \ -H "x-api-key: $COWORKER_API_KEY" \ -d '{ "to": "momo@quilar.com", "subject": "JARVIS Status Report", "text": "All systems operational." }' ``` ### Send an HTML Email with Multiple Recipients ```bash curl -X POST http://localhost:3333/email/send \ -H "Content-Type: application/json" \ -H "x-api-key: $COWORKER_API_KEY" \ -d '{ "to": ["momo@quilar.com", "admin@quilar.com"], "cc": "reports@quilar.com", "subject": "Weekly Report", "html": "

Weekly Report

System health: Good

" }' ``` ### Check Email Configuration ```bash curl -X GET http://localhost:3333/email/status \ -H "x-api-key: $COWORKER_API_KEY" ``` ## Integration Examples ### n8n Workflow Use the email endpoints in n8n workflows for automated notifications: 1. **HTTP Request Node** → `POST /email/send` 2. **Data:** Include dynamic content from previous nodes 3. **Authentication:** Use `COWORKER_API_KEY` header ### Telegram Notifications Combine with Telegram for dual-channel notifications: ```bash # Send both email and Telegram notification curl -X POST http://localhost:3333/email/send -H "x-api-key: $COWORKER_API_KEY" -d '...' curl -X POST http://localhost:3333/telegram/send -H "x-api-key: $COWORKER_API_KEY" -d '...' ``` ## Environment Setup for Gmail For Gmail SMTP, use these settings: ```bash EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_SECURE=false EMAIL_USER=jarvis.aajour@gmail.com EMAIL_PASS=your-app-specific-password EMAIL_FROM="JARVIS " ``` **Note:** Gmail requires app-specific passwords. Generate one in Google Account Settings → Security → App passwords. ## Error Handling Common error responses: ### Configuration Error ```json { "success": false, "error": "Email is not configured. Please set EMAIL_* environment variables." } ``` ### Authentication Error ```json { "success": false, "error": "Invalid login: 535-5.7.8 Username and Password not accepted", "code": "EAUTH" } ``` ### Validation Error ```json { "success": false, "error": "Subject is required and must be a non-empty string" } ``` ## Security Considerations - Store email passwords as app-specific passwords, not account passwords - Use environment variables for sensitive configuration - Consider rate limiting for production deployments - Validate recipient addresses to prevent abuse - Log email activity for audit purposes ## Skill Actions When this skill is invoked, it can handle these actions: - `send` - Send an email with provided parameters - `status` - Check email configuration status - `test` - Send a test email to verify configuration - `configure` - Guide user through email setup Example usage: - `/email send to:momo@quilar.com subject:"Test" text:"Hello from JARVIS"` - `/email status` - `/email test`