SMTP Email Delivery Service
Send emails through any SMTP server with support for HTML content, attachments, CC/BCC, and priority settings.
Actions
send
Send an email via an SMTP server.
Required Fields:
| Field | Type | Description |
|---|---|---|
action | string | Must be "send" |
smtp_url | string | SMTP server URL with credentials. Format: smtp://username:password@hostname:port for STARTTLS (port 587) or smtps://username:password@hostname:port for SSL/TLS (port 465). |
to | array or string | Recipient email address(es). Accepts an array of strings, a single string, or a comma-separated string. |
subject | string | Email subject line. |
body | string | Email body content, plain text or HTML depending on body_type. |
Optional Fields:
| Field | Type | Default | Description |
|---|---|---|---|
from_email | string | Username from smtp_url | Sender email address. Useful when sending from a different address than the one used for authentication. |
body_type | string | "plain" | Body format: "plain" for plain text, "html" for HTML content. |
cc | array | — | CC recipients. Array of email addresses. Visible to all recipients. |
bcc | array | — | BCC recipients. Array of email addresses. Hidden from other recipients. |
attachments | array | — | File attachments (max 25MB total). Each object requires filename (string) and content (base64-encoded string). Optional content_type (MIME type, defaults to application/octet-stream). |
priority | string | "normal" | Email priority: "low", "normal", or "high". Sets the X-Priority header. |
Example — Send a plain text email:
{
"action": "send",
"smtp_url": "smtp://user:app-password@smtp.gmail.com:587",
"to": ["recipient@example.com"],
"subject": "Monthly Status Update",
"body": "Hello,\n\nHere is the monthly status update.\n\nBest regards,\nThe Team"
}
Example — Send an HTML email:
{
"action": "send",
"smtp_url": "smtps://user:pass@smtp.example.com:465",
"to": ["recipient@example.com"],
"subject": "Welcome!",
"body": "<html><body><h1>Welcome!</h1><p>Thank you for signing up.</p></body></html>",
"body_type": "html"
}
Example — Send with CC, BCC, attachment, and high priority:
{
"action": "send",
"smtp_url": "smtp://user:pass@mail.example.com:587",
"to": ["recipient@example.com"],
"cc": ["manager@example.com"],
"bcc": ["archive@example.com"],
"subject": "Q1 Report",
"body": "Please find the quarterly report attached.",
"priority": "high",
"attachments": [
{
"filename": "report.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf"
}
]
}
Example — Multiple recipients with a custom sender:
{
"action": "send",
"smtp_url": "smtp://auth-user:pass@mail.company.com:587",
"to": ["alice@example.com", "bob@example.com"],
"from_email": "noreply@company.com",
"subject": "Team Announcement",
"body": "<html><body><p>Please review the updated policy.</p></body></html>",
"body_type": "html"
}
Common Workflows
- Send a notification email — Use the
sendaction with plain text body to deliver a quick notification to one or more recipients. - Send a formatted newsletter — Set
body_typeto"html"and provide styled HTML content with images and links. - Distribute a report with attachments — Attach base64-encoded files (PDF, CSV, Excel) and send to recipients with CC for visibility.
- Confidential distribution — Use
bccto send to multiple recipients without revealing other addresses. - Urgent communication — Set
priorityto"high"to flag the email as important in recipient email clients.
Important Notes
- Gmail users: You must use an App Password, not your regular account password. Generate one at https://myaccount.google.com/apppasswords.
- SMTP URL schemes: Use
smtp://for STARTTLS (port 587, recommended) orsmtps://for direct SSL/TLS (port 465). - Attachment size limit: Total attachment size must not exceed 25MB.
- From address: Some providers (like Gmail) enforce that the sender address matches the authenticated account. Use
from_emailonly when your provider allows sending from an alias. - Priority: Use
"high"priority sparingly to avoid emails being flagged as spam. - Common MIME types for attachments:
application/pdf,text/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet(Excel),image/png,image/jpeg,text/plain.







