SMTP

Communication Host, user and password Windmill docs

Send email over SMTP from any Windmill script, flow or app — with any provider or your own mail server.

What you can do with SMTP

Complete, deployable projects built around SMTP — the fastest way to get something real running.

Set up in 3 steps

1

Collect your provider's SMTP settings

You need the host, the port, and the username and password the provider issued for sending. They are usually on a page called SMTP or Sending, not with the API keys.

2

Add the resource in Windmill

Open Resources, add a resource of type smtp, and fill the fields.

3

Run your first script

Fork the send email script below and send yourself one before wiring it into a flow.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

Flows

Multi-step workflows that already wire SMTP to something else.

All flows →

Resource type

smtp — the shape of the credential every script on this page expects.

View raw schema →
FieldTypeRequiredWhat it is
hoststringYesSMTP host address
passwordstringNo
portintegerNoport number on which to connect
userstringNo

Questions

Which port should I use?

587 with STARTTLS is the usual choice, 465 for implicit TLS. Your provider's documentation says which it expects.

Is this the same as the instance SMTP setting?

No. This resource is for scripts that send their own mail. An instance-wide SMTP server, set by an admin, is what sends user invites and critical alerts.

Are my credentials stored on the hub?

Never. They live only in your own Windmill workspace, encrypted at rest.