logo_smallAxellero.io

SMTP

Send emails via SMTP protocol in Axellero workflows.

SMTP Node

Send emails through SMTP servers in Axellero workflows. Supports multiple authentication methods and encryption protocols.

Available Operations

  • Send: Send emails with attachments and advanced formatting options

Connection Configuration

ParameterTypeRequiredDescription
hostTEXTYesSMTP server hostname
portINTYesSMTP server port (e.g., 587 for TLS, 465 for SSL, 25 for unencrypted)
usernameTEXTNoSMTP username for authentication
passwordTEXTNoSMTP password for authentication
encryptionTEXTNoEncryption method: none, ssl, tls (default: none)
authenticationTEXTNoAuthentication method: none, plain, username, crammd5 (default: none)
{
  "host": "smtp.gmail.com",
  "port": 587,
  "username": "{{ctx.consts.SMTP_USERNAME}}",
  "password": "{{ctx.consts.SMTP_PASSWORD}}",
  "encryption": "tls",
  "authentication": "plain"
}

Email Composition

ParameterTypeRequiredDescription
fromTEXTYesSender email address
toTEXTYesRecipient email addresses (comma-separated)
ccTEXTNoCC recipients (comma-separated)
bccTEXTNoBCC recipients (comma-separated)
subjectTEXTYesEmail subject line
bodyTEXTYesEmail body content
isHtmlBOOLEANNoWhether body content is HTML (default: false)
attachmentsTEXTNoJSON array of attachment objects

Basic Email

{
  "from": "sender@example.com",
  "to": "recipient@example.com",
  "subject": "Test Email",
  "body": "This is a test email message.",
  "isHtml": false
}

HTML Email with Multiple Recipients

{
  "from": "notifications@company.com",
  "to": "user1@example.com,user2@example.com",
  "cc": "manager@company.com",
  "subject": "Project Update",
  "body": "<h2>Project Status</h2><p>The project is <strong>on track</strong> for delivery.</p>",
  "isHtml": true
}

Email with Attachments

{
  "from": "reports@company.com",
  "to": "{{ctx.user.email}}",
  "subject": "Monthly Report",
  "body": "Please find the monthly report attached.",
  "attachments": "[{\"name\":\"report.pdf\",\"data\":\"{{ctx.nodes.pdfGenerator.outputs.base64}}\",\"type\":\"base64\"},{\"name\":\"chart.png\",\"url\":\"https://example.com/chart.png\",\"type\":\"url\"}]"
}

Attachment Format

Attachments support two methods:

Base64 Data

{
  "name": "document.pdf",
  "data": "JVBERi0xLjQKJcfs...",
  "type": "base64"
}

URL Download

{
  "name": "image.jpg", 
  "url": "https://example.com/image.jpg",
  "type": "url"
}

Workflow Integration

Use workflow context to construct dynamic email content:

{
  "from": "{{ctx.consts.SYSTEM_EMAIL}}",
  "to": "{{ctx.user.email}}",
  "subject": "Order Confirmation - {{ctx.vars.orderNumber}}",
  "body": "Hello {{ctx.user.name}}, your order for {{ctx.vars.productName}} has been confirmed.",
  "isHtml": false
}

Response Format

Success Response

{
  "success": true,
  "messageId": "smtp_msg_12345",
  "recipients": ["user@example.com", "manager@company.com"]
}

Error Response

{
  "success": false,
  "error": "Failed to connect to SMTP server"
}

Common SMTP Configurations

Gmail SMTP

{
  "host": "smtp.gmail.com",
  "port": 587,
  "encryption": "tls",
  "authentication": "plain"
}

Outlook/Hotmail SMTP

{
  "host": "smtp-mail.outlook.com", 
  "port": 587,
  "encryption": "tls",
  "authentication": "plain"
}

Office 365 SMTP

{
  "host": "smtp.office365.com",
  "port": 587,
  "encryption": "tls", 
  "authentication": "plain"
}

Custom SMTP Server

{
  "host": "mail.company.com",
  "port": 465,
  "encryption": "ssl",
  "authentication": "crammd5"
}

Use Cases

  • Automated notifications: Send order confirmations and status updates
  • Alert systems: Email critical system alerts and monitoring notifications
  • Report delivery: Send scheduled reports and analytics summaries
  • User communications: Account activation and password reset emails