IMAP: Connect
imap_connectConnect a generic IMAP/SMTP mailbox directly from the conversation with the mailbox credentials (alternative to the account_connect browser link, which is preferred when the user does not want to type a password in the chat). 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.
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 |