The Email component is an application component that allows users to get and send email from Mail Protocol. It can carry out the following tasks:
- Send Email
- Read EmailsYou can connect to different email servers through the Email component. Emails are fetched and sent using the IMAP and SMTP protocols, respectively. You can set the server address and port for each protocol in the component configuration.
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.json and tasks.json files respectively.
#Setup
In order to communicate with the
external application, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
Field | Field ID | Type | Note |
---|---|---|---|
Server Address (required) | server-address | string | The address of the email server |
Server Port (required) | server-port | integer | The port of the email server |
Email Address (required) | email-address | string | The email address of the user |
App Password (required) | password | string | The password of the App passwords in Gmail settings |
Supported Provider Samples for Sending Email
Provider | SMTP Server Address | Port | Notes |
---|---|---|---|
Gmail | smtp.gmail.com | 587 (TLS) or 465 (SSL) | |
Outlook | smtp-mail.outlook.com | 587 | |
Yahoo | smtp.mail.yahoo.com | 465 or 587 | |
iCloud | smtp.mail.me.com | 587 | If you see an error message when using SSL, try using TLS or STARTTLS instead. |
Supported Provider Samples for Receiving Emails
Provider | IMAP Server Address | Port |
---|---|---|
Gmail | imap.gmail.com | 993 |
Outlook | outlook.office365.com | 993 |
Yahoo | imap.mail.yahoo.com | 993 |
iCloud | imap.mail.me.com | 993 |
For App Password, please follow the steps below:
-
- Please Sign in to your Google Account with link: https://myaccount.google.com/apppasswords
-
- Create a new App Password and save it in a secure place.
-
- Add App Password as a new secret in the Instill Platform by navigating to Console > Settings > Secrets.
-
- Reference the secret in the App Password field in the component configuration.
#Supported Tasks
#Send Email
Send an email to recipients
Input | ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_SEND_EMAIL |
Recipient (required) | recipients | array[string] | The email addresses of the recipients |
Cc | cc | array[string] | The email addresses for Carbon Copy |
Bcc | bcc | array[string] | The email addresses for Blind Carbon Copy |
Subject | subject | string | The subject of the email |
Message (required) | message | string | The message to be sent |
Output | ID | Type | Description |
---|---|---|---|
Result | result | string | The result of sending the email |
#Read Emails
Read emails from a mailbox
Input | ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_READ_EMAILS |
Search | search | object | The search criteria for the emails |
Input Objects in Read Emails
Search
The search criteria for the emails
Field | Field ID | Type | Note |
---|---|---|---|
Search Date | date | string | Search for emails with the date the email was sent |
Limit | limit | integer | The maximum number of emails to search for |
Mailbox | mailbox | string | The mailbox to search for emails |
Search Message | search-email-message | string | Search for emails with a specific message |
Search From | search-from | string | Search for emails from a specific email address |
Search Subject | search-subject | string | Search for emails with a specific subject |
Search To | search-to | string | Search for emails to a specific email address |
Output | ID | Type | Description |
---|---|---|---|
Emails | emails | array[object] | The emails that match the search criteria |
Output Objects in Read Emails
Emails
Field | Field ID | Type | Note |
---|---|---|---|
Date | date | string | The date the email was sent |
From | from | string | The email address of the sender |
Message | message | string | The message of the email |
Subject | subject | string | The subject of the email |
To | to | array | The email addresses of the recipient |
#Mailbox
You have to confirm what exactly the mailbox name is. Take Gmail as an example, the mailbox names are following.
Mailbox | Mailbox Name to input |
---|---|
Inbox | INBOX |
Sent | [Gmail]/Sent Mail |
Drafts | [Gmail]/Drafts |
#Search From and Search To
You need to input the exact same email address with <
as a prefix and >
as a suffix as the email you want to search for.
For example, if you want to search for the email from email@example.com
, you need to input <email@example.com>
.