Overview
The email node sends emails via SMTP. Perfect for sending alerts,
reports, and notifications from your edge devices. Supports HTML emails, attachments, and multiple recipients.
SMTP
Protocol
TLS
Encryption
HTML
Support
Files
Attachments
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| server | string | - | SMTP server hostname |
| port | number | 587 | SMTP port (25, 465, 587) |
| secure | boolean | true | Use TLS/SSL encryption |
| user | string | - | SMTP username |
| password | string | - | SMTP password or app password |
| from | string | - | Sender email address |
| to | string | - | Recipient(s), comma separated |
Inputs & Outputs
Input
{
"to": "user@example.com",
"subject": "Alert: Temperature High",
"text": "Plain text body",
"html": "<h1>HTML body</h1>",
"attachments": [
{
"filename": "data.csv",
"content": buffer_or_string
}
]
} Output
{
"payload": {
"accepted": ["user@example.com"],
"rejected": [],
"messageId": "<abc123@mail>",
"response": "250 OK"
}
} Example: Temperature Alert Email
Send an email when temperature exceeds threshold.
// Function node: Create email alert
var temp = msg.payload.temperature;
var device = msg.payload.deviceId;
msg.to = "ops@company.com";
msg.subject = "🔥 Temperature Alert - " + device;
msg.html = `
<div style="font-family: Arial, sans-serif;">
<h2 style="color: #ef4444;">High Temperature Warning</h2>
<p>Device <strong>${device}</strong> reported:</p>
<p style="font-size: 32px; color: #f97316;">${temp}°C</p>
<p>Time: ${new Date().toISOString()}</p>
<hr>
<p style="color: #666;">Automated alert from EdgeFlow</p>
</div>
`;
return msg; Common SMTP Providers
Gmail
Server: smtp.gmail.com
Port: 587
Requires App Password
Outlook/Microsoft 365
Server: smtp.office365.com
Port: 587
Use your regular credentials
SendGrid
Server: smtp.sendgrid.net
Port: 587
User: apikey
Amazon SES
Server: email-smtp.region.amazonaws.com
Port: 587
Use IAM SMTP credentials