SMTP
Send emails via SMTP from Airplane runbooks.
The SMTP resource allows runbooks to send emails via SMTP. For a high-level introduction to
resources, see the resources page.
Creating an SMTP resource
To create a new SMTP resource, visit resources
for your team, click the "new" button, and select the SMTP resource type. Enter your connection
details in the form:

Name should be a human-readable name for your resource.
Hostname should be the IP address or DNS name of your SMTP server. Unless you're connecting to
this server behind a self-hosted agent, this should be the public IP address
or the public DNS name of your SMTP server.
Accessing from runbooks
You can use your SMTP resource in runbooks by adding an
email block.
Next steps
IP whitelisting
If your SMTP server has restrictions on incoming network connections, you'll need to ensure the
Airplane IP addresses are whitelisted:
- 34.121.89.145
- 34.68.100.27
- 34.72.182.225
Private networking
To connect to an SMTP server inside a private VPC, you can
self-host the agent and run the agent within your own VPC. Agents are
responsible for sending emails, and will be able to connect to your SMTP server from within your
network.
Field reference
When this resource is attached to a task, its fields
are available in the JSON environment variable
AIRPLANE_RESOURCES
under the alias it was attached
with. The available fields are documented below.idstring
The ID of the resource.
slugstring
The slug of the resource as defined in the resource settings page.
namestring
The name of the resource.
The kind of the resource.
hostnamestring
The hostname of the SMTP server.
portstring
The port of the SMTP server.
authobject
The SMTP auth configuration.
auth.usernamestring
The login username.
auth.passwordstring
The login password.
auth.identitystring
The login identity. (Only set for plain
auth.)
auth.secretstring
The login password digest. (Only set for crammd5
auth.)