IMAP: Connect
imap_connectConnect a generic IMAP/SMTP mailbox directly from the conversation with the mailbox credentials (credentials are entered in this tool; account_connect provides a secure browser form). Nilyo forwards the credentials once to the connection service and never stores them. Start with user + password only (servers are auto-detected); if the result says the IMAP or SMTP configuration is invalid, ask the user for the servers (e.g. OVH: imap ssl0.ovh.net:993 ssl, smtp ssl0.ovh.net:465 ssl; Gmail/Microsoft mailboxes should use the Google/Outlook connection instead). Use account_id to re-authenticate an existing disconnected IMAP account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user": "<user>",
"password": "<password>"
},
"name": "imap_connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Mailbox login, usually the full email address. | |
| password | Yes | Mailbox password or app password, exactly as given by the user. | |
| imap_host | No | ||
| imap_port | No | ||
| smtp_host | No | ||
| smtp_port | No | ||
| account_id | No | Nilyo connection ID (unipile_account_id from list_connected_accounts) of an EXISTING account to re-authenticate. Omit to connect a new account. | |
| initial_sync | No | Enable the initial mailbox synchronization so account-wide listing/search (email_list_messages, email_resolve_message) works; without it, use email_list_folders + email_list_folder_messages. Default false (faster connection). | |
| imap_encryption | No | ||
| smtp_encryption | No |