SMTP Integration

Connect Retool to SMTP servers

1. Add to Retool

Create a new resource in Retool, and select "SMTP" as the type. Enter your SMTP server host endpoint in the "Host" field. Depending on how authentication is set up for your SMTP, you may need to enter a port, username, and/or password.

Resources > Add > SMTP

2. Create Queries

You can now select your newly-created SMTP resource from the Resource dropdown when creating queries in your Retool apps.

Some pointers:

  • The default type of the body is raw text, but you can toggle to HTML instead.

  • Multiple recipients (to, cc, bcc) can be specified by separating emails with commas.

  • Attachments can be added to queries by adding a File Picker component and referencing the file from the component in the "Attachment(s)" section. For instance, you could set "Attachment(s)" to {{filepicker1.file}}.

  • Emails sent with SMTP queries on Retool have 'Retool' as the User-Agent and X-Mailer in the email headers.

As with any other query in Retool, you can use the data returned by or the failure/success of a SMTP query to trigger other actions.


Did this page help you?