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 server
hosttextRequired - The SMTP server to send through, such as smtp.example.com. Your email provider lists it under its SMTP or outgoing mail settings.
- Port
portnumber - The port the server listens on. Leave it empty for the usual one: 587 for STARTTLS, 465 for SSL/TLS, 25 for none.
- Connection security
securitytext - 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. - Username
usernametext - The account to sign in with, usually the full email address. Leave it empty for a server that needs no sign-in.
- Password
passwordtext - 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.
- From
sendertextRequired - 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.
- To
totextRequired - 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>.
- Cc
cctext - Who else to send to, visibly. Separate several addresses with commas.
- Bcc
bcctext - Who else to send to, without the other recipients seeing. Separate several addresses with commas.
- Reply-to
reply_totext - Where replies should go, if not to the sender. Separate several addresses with commas.
- Subject
subjecttextRequired - The subject line.
- Body
bodytext - The message as plain text. Fill in this, the HTML body, or both.
- HTML body
html_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.
- Attachments
attachmentslist - 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
fromtextmessage_idtextrecipientslistrefused_recipientslistsenttrue/falsesubjecttext
Example output
{
"from": "example_value",
"message_id": "example_value",
"recipients": [],
"refused_recipients": [],
"sent": true,
"subject": "example_value"
}