Skip to content

SMTP Send

Type: smtp-send  ·  Package: SMTP / IMAP Email Activities v1.0.0

Sends an email through an SMTP server, without needing Outlook installed. Supports multiple recipients, copy (CC) and blind copy (BCC), body in text or HTML, and attachments. It is the activity to send notifications, reports and confirmations from a bot, also in unattended execution.

It connects to the SMTP server with the credentials you give it and sends the email. The data for connection (host, port, username, password, security) are those of the sending server. The recipients (to, cc, bcc) can be text or a list.

ParameterEditorDescription
hosttextServidor SMTP (e.g. smtp.gmail.com).
usernametextUser (usually your full email).
passwordcredencialPassword or App Password. Use = credential(...).
totextRecipient(s): a text or a list.
subjecttextAsunto.
bodytextEmail body.
ParameterEditorDescription
portnumberPuerto SMTP. Por defecto 587.
fromtextSender address. By default, username.
replyTotextReply address (Reply-To).
isHtmlbooleanThe body is HTML. By default false.
cctextCopia: texto o list.
bcctextCopia oculta: texto o list.
attachmentstextPath(s) of files to attach: text or list.
securitylistCifrado: auto (def.) · none · ssl · starttls.

Send an attached invoice using secure credentials:

SMTP Send
host = "smtp.gmail.com"
username = = credential("correo-bot")["user"]
password = = credential("correo-bot").ToPlainText()
to = = cliente.correo
subject = = "Factura " + numeroFactura
body = "Adjuntamos su factura. Gracias por su compra."
attachments = = arr("C:/facturas/" + numeroFactura + ".pdf")