-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Usage
The commands can be split into 3 different categories:
Add a new mail account
Usage:
ion-mail account addAlias: ls
Displays a list all configured accounts. The currently active account (used by default for mail commands) will be highlighted.
Usage:
ion-mail account listSets the specified account as the default for all following mail and folder operations.
Arguments:
-
<ACCOUNT>: The ID or email of the account to activate
Usage:
ion-mail account use <ACCOUNT>Shows details for the account currently in use, including the email address, display name, and connection settings.
Usage:
ion-mail account whoamiUpdate specific details like the name or server. If no flags are provided, the currently active account will be edited.
Options:
-
-a, --account <ACCOUNT>: The ID or email of the account to edit
Usage:
ion-mail account edit [OPTIONS]This command removes the account configuration from your local machine. This action is IRREVERSIBLE and does not delete the actual mail on the server.
Options:
-
-a, --account <ACCOUNT>: The account ID or email to log out of (defaults to the currently active account)
Usage:
ion-mail account logout [OPTIONS]Construct and send a new email
If required fields (to, subject, body) are missing from the flags, the application will prompt for them interactively.
Options:
-
-t, --to <TO>: Recipient email address(es) -
-s, --subject <SUBJECT>: The subject line of the email -
-b, --body <BODY>: The message content -
-a, --attachments <ATTACHMENTS>: Path to files to attach (can be used multiple times) -
-y, --yes: Whether to skip final confirmation
Usage:
ion-mail mail send [OPTIONS]This command fetches the entire message (sender, subject, body) from the server using the index number provided by the 'folder view' command.
Arguments:
-
<FOLDER>: The folder where the mail is located -
<ID>: The index number shown next to the email in 'folder view'
Usage:
ion-mail mail read <FOLDER> <ID>This command downloads all attachments into the save folder. If the attachment ID is set, only the attachments with this index will be downloaded.
Arguments:
-
<FOLDER>: The folder where the email is located -
<ID>: The index number shown next to the email in 'folder view' -
<SAVE_FOLDER>: The folder to save the attachments to
Options:
-
-a, --attachment-id <ATTACHMENT_ID>: The index number shown next to the attachments when viewing an email
Usage:
ion-mail mail download [OPTIONS] <FOLDER> <ID> <SAVE_FOLDER>Search for messages matching a specific sender or query
This command performs a client-side search of your mail. It scans headers, subjects, and body content to find relevant matches.
Options:
-
-q, --query <QUERY>: The search terms or sender to look for -
-f, --folder <FOLDER>: The folder to search within. Defaults to INBOX. Use 'ALL' to search across every folder available on the account.
Usage:
ion-mail mail search [OPTIONS] --query <QUERY>This command transfers a specific email between folders on the server.
Arguments:
-
<FROM>: The name of the folder where the message is currently located -
<TO>: The name of the destination folder. If the folder does not exist, the command will fail.
Options:
-
-i, --id <ID>: The index number(s) of the message to move
Usage:
ion-mail mail move [OPTIONS] <FROM> <TO>This command permanently deletes a message. This action cannot be undone.