ToolJet/docs/versioned_docs/version-2.68.0/data-sources/smtp.md
Aman Regu bdfe3270e2
[docs]: v2.68.0-Beta (#10755)
* docs: jira

* docs: formatting + Client Credentials grant type

* docs: connection string pgsql

* docs: parameterized queries mysql

* docs: parameterized queries in PostgreSQL

* docs: update mysql example

* docs: TJDB sql editor

* docs: add metadata to REST API

* docs: add, update  postgresql media

* docs: add metadata to graphql

* docs: update parameterized queries

* docs: add parameterized queries for mssql

* docs: add SSL Cert to mysql

* docs: TJDB SQL restricted commands

* docs: update JIRA token location

* docs: update delete issue example

* docs: update find user by query example

* docs: remove session id from get assignable users

* docs: use correct image for get issues for board

* docs: update create issue example

* docs: update delete issue media

* docs: update assignable users media

* docs: update examples

* docs: update key desc

* docs: v2.68.0-Beta
2024-09-13 19:23:19 +05:30

2.6 KiB

id title
smtp SMTP

SMTP

The SMTP datasource facilitates the connection between ToolJet applications and email servers, enabling the apps to send emails.

Connection

To connect to an SMTP server, the following credentials are typically required:

  • Host
  • Port
  • Username
  • Password

:::tip Finding configuration details: The SMTP configuration details like host and port can usually be obtained from your email service provider. Here are some general settings for the most commonly used email providers:

  • Gmail: Host: smtp.gmail.com; Port: 587 or 465 (SSL); Username: your full Gmail email address; Password: your Gmail password.
  • Yahoo Mail: Host: smtp.mail.yahoo.com; Port: 465 (SSL); Username: your Yahoo Mail email address; Password: your Yahoo Mail password.
  • Outlook.com/Hotmail: Host: smtp.office365.com; Port: 587 or 465 (SSL); Username: your Outlook.com/Hotmail email address; Password: your Outlook.com/Hotmail password.

Before saving the configuration, it's possible to test the connection by clicking the "Test Connection" button. :::

smtp connect

Querying SMTP

To create a query for sending an email, follow these steps:

  1. Open the query panel located at the bottom panel of the editor.
  2. Click the +Add button on the left to create a new query.
  3. Select SMTP from the global datasource.
  4. Provide the following properties:
  • From required : Email address of the sender
  • From Name : Name of the sender
  • To required : Recipient's email address
  • CC mail to : Email address of the recipients that will receive a copy of the email, and their email addresses will be visible to other recipients.
  • BCC mail to : Email address of the recipients that will receive a copy of the email but the email addressed will be hidden to other recipients.
  • Subject : Subject of the email.
  • Body : You can enter the body text of the email in either raw text or html format, in their respective fields.
  • Attachments : You can add attachments to an SMTP query by referencing the file from the File Picker component in the attachments field.

For instance, you can set the Attachments field value to {{ components.filepicker1.file }} or pass an object {{ name: 'filename.jpg', dataURL: '......' }} to include attachments.

smtp connect