SMTP

Built-in step · 1 step

Send email through any mail server.

Send an email

Send an email through any mail server, using the SMTP details your provider gives you. Set the server, the sign-in, who it is from and to, and the message, with files from earlier steps attached. Store the password as a workspace secret and reference it so it is never stored in the workflow. For a mailbox Lodol already connects to, such as Gmail or Outlook, use that app's own send action instead.

Inputs

Mail serverhosttextRequired
The SMTP server to send through, such as smtp.example.com. Your email provider lists it under its SMTP or outgoing mail settings.
Portportnumber
The port the server listens on. Leave it empty for the usual one: 587 for STARTTLS, 465 for SSL/TLS, 25 for none.
Connection securitysecuritytext
How the connection is secured. STARTTLS suits port 587 and most providers; SSL/TLS suits port 465. None sends in the clear, for a server on your own network only: it won't sign in to a server on the internet.One of: starttls, ssl (SSL/TLS), none. Default: starttls.
Usernameusernametext
The account to sign in with, usually the full email address. Leave it empty for a server that needs no sign-in.
Passwordpasswordtext
The account's password or app password. Store it as a workspace secret and reference it here, for example @secrets.SMTP_PASSWORD, so it is never stored in the workflow.
FromsendertextRequired
Who the email is from. A name is allowed, as in Jane Doe <jane@example.com>. Most servers only send from the address signed in with.
TototextRequired
Who to send to. Separate several addresses with commas, or reference a list from an earlier step; a name is allowed, as in Jane Doe <jane@example.com>.
Cccctext
Who else to send to, visibly. Separate several addresses with commas.
Bccbcctext
Who else to send to, without the other recipients seeing. Separate several addresses with commas.
Reply-toreply_totext
Where replies should go, if not to the sender. Separate several addresses with commas.
SubjectsubjecttextRequired
The subject line.
Bodybodytext
The message as plain text. Fill in this, the HTML body, or both.
HTML bodyhtml_bodytext
A formatted version of the message, as HTML. Mail apps that can show it do; the plain text body is kept for the rest.
Attachmentsattachmentslist
Files to attach, such as a PDF an earlier step made or downloaded. Upload one, or use a file from an earlier step. Up to 20 files.

Outputs

fromtext
message_idtext
recipientslist
refused_recipientslist
senttrue/false
subjecttext
Example output
{
  "from": "example_value",
  "message_id": "example_value",
  "recipients": [],
  "refused_recipients": [],
  "sent": true,
  "subject": "example_value"
}

On this page