docs/versioned_docs/version-2.12.0/data-sources/smtp.md
The SMTP datasource facilitates the connection between ToolJet applications and email servers, enabling the apps to send emails.
To connect to an SMTP server, the following credentials are typically required:
:::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:
Host: smtp.gmail.com; Port: 587 or 465 (SSL); Username: your full Gmail email address; Password: your Gmail password.Host: smtp.mail.yahoo.com; Port: 465 (SSL); Username: your Yahoo Mail email address; Password: your Yahoo Mail password.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. :::
<div style={{textAlign: 'center'}}> </div>To create a query for sending an email, follow these steps:
+Add button on the left to create a new query.SMTP from the global datasource.required : Email address of the senderrequired : Recipient's email addressFor instance, you can set the Attachments field value to {{ components.filepicker1.file }} or pass an object {{ name: 'filename.jpg', dataURL: '......' }} to include attachments.