SMTP

The SMTP block sends email through any standard SMTP mail server, including Gmail, Outlook, and self-hosted or custom mail servers. It connects directly using the server hostname, port, and credentials you provide rather than a vendor-specific API.

With the SMTP block, you can:

  • Connect to any SMTP server: Configure host, port, and security protocol (TLS, SSL, or none) for the mail server of your choice
  • Control message content and formatting: Set sender, recipients, subject, and body, with support for either plain text or HTML content
  • Reach multiple recipients and attach files: Add CC and BCC recipients, set a reply-to address, and attach files to the outgoing email

In Sim, the SMTP block allows your agents to send emails as part of a workflow by supplying connection details and message content, then confirming delivery through the returned success status and message ID. This makes it possible to notify recipients, deliver generated reports, or trigger email-based alerts directly from a workflow, with the block reporting the message ID on success or an error message if sending fails.

Usage Instructions

Send emails using any SMTP server (Gmail, Outlook, custom servers, etc.). Configure SMTP connection settings and send emails with full control over content, recipients, and attachments.

Actions

smtp_send_mail

Send emails via SMTP server

Input

ParameterTypeRequiredDescription
smtpHoststringYesSMTP server hostname (e.g., smtp.gmail.com)
smtpPortnumberYesSMTP server port (587 for TLS, 465 for SSL)
smtpUsernamestringYesSMTP authentication username
smtpPasswordstringYesSMTP authentication password
smtpSecurestringYesSecurity protocol (TLS, SSL, or None)
fromstringYesSender email address
tostringYesRecipient email address
subjectstringYesEmail subject
bodystringYesEmail body content
contentTypestringNoContent type (text or html)
fromNamestringNoDisplay name for sender
ccstringNoCC recipients (comma-separated)
bccstringNoBCC recipients (comma-separated)
replyTostringNoReply-to email address
attachmentsfile[]NoFiles to attach to the email

Output

ParameterTypeDescription
successbooleanWhether the email was sent successfully
messageIdstringMessage ID from SMTP server
tostringRecipient email address
subjectstringEmail subject
errorstringError message if sending failed

On this page