CLI User Operations
User specific operations include the custom settings for each user like creating a signature, folders, labels, and setting up their account preferences. These commands don't require any admin access and can be executed by any user in the organization.
Table of Contents
Account details
The user mail account details help you to get and update information about the mail accounts and related configurations and settings of the user in the organization. The following are the details included in this section:
- Mail accounts of the user
- Send Mail details of the user
- Email forwarding
- Vacation reply details of the user
User Account
The User Account section help you to enable/ disable the external access modes for the account, like POP/ IMAP and Active Sync for the user. Further you can enable/ disable incoming/ outgoing for the account using these commands.
Function | Command | Purpose | Parameters reference link |
| Get all accounts of a user | account list | To get the account details of the currently authenticated user. | Account details |
| Get specific account details | account inspect --accountid <acc_Id> | To retrieve details of a specific account. | Specific account details |
| Update mail account sequence | account update-sequence | To update the sequence/ order of the mail accounts for processing new emails. | Update mail account sequence |
| Update reply to address | account update-replyto | To update the Reply-To address for the particular account. | Update reply to address |
| Resend verification for reply to address | account resend-replyto-verification | To resend the verification for confirmation of the Reply-To address for the particular account. | Resend verification for reply to address |
Send Mail details
The Send Mail Details section helps you to get and update information about the send mail addresses (From Addresses) of the specific user accounts.
Function | Command | Purpose | Parameters reference link |
| Add send mail details | account add-sendmaildetails | To add send mail details such as the display name and the email address of the user. | Add send mail details |
| Update display name | account update-display-name | To update the display name for a specific from email address for the user. | Update display name |
| Update email address | account update-email | To update the email address for the user. | Update email address |
| Update display name and email address | account update-displaynameemail | To update the display name and email address for the user. | Update display name and email address |
User email forward details
The User Email Forward section helps you to get, add, or update the Email Forwarding details of the account.
Function | Command | Purpose | Parameters reference link |
| Add email forwarding | userManagement addMailForward | To add automatic email forwarding for the account to a specific email address. | Add email forwarding |
| Verify email forwarding | userManagement verifyMailForward | To verify the email address to which the email forwarding is added. | Verify email forwarding |
| Resend verification for email forwarding | userManagement resendMailForwardVerficationMail | To resend the verification link to the email address to enable Email Forwarding. | Resend verification |
| Enable email forwarding | userManagement enableMailForward | To enable email forwarding for a verified email address. | Enable email forwarding |
| Disable email forwarding | userManagement disableMailForward | To disable the existing Email Forwarding added to an email address | Disable email forwarding |
| Delete Zoho Mail copy in email forwarding | userManagement deleteZohoMailCopy | To delete the copyof the email in Zoho Mail inbox, after the email has been forwarded. | Delete Zoho Mail copy |
| Delete email forwarding | userManagement deleteMailForward | To remove the existing email forwarding for the account and delete the email address reference. | Delete email forwarding |
Vacation reply details
The Vacation Reply section helps you add, retrieve, or remove the Vacation Reply details of the account.
Function | Command | Purpose | Parameters reference link |
| Add vacation reply | vacation add | To add a vacation reply for the account. | Add vacation reply |
| Update vacation reply | vacation update | To update the vacation reply for the account. | Update vacation reply |
| Delete vacation reply | vacation delete | To remove the vacation reply added to the account. | Remove vacation reply |
Folder details
The Folder details section helps you to get and update information about the Folder details of a particular user account.
Function | Command | Purpose | Parameters reference link |
| Create a new folder | folders create | Create a new folder with the specified name and details, in the given path. | Create new folder |
| Get all folders | folders list | To get the details of all the folders in a particular account along with the Folder Id of each folder. | Retrieve folders list |
| Get a specific folder | folders inspect | To get the details of a particular folder, based on the Folder Id provided. | Retrieve specific folder |
| Rename folder | folders rename | To rename a particular folder with the specified name. | Rename folder |
| Move folder | folders move | To move a folder to a different position in the folder tree. | Move folder |
| Enable IMAP view for a folder | folders enable-imap-view | To enable IMAP view for the folder, to make it accessible from the IMAP Clients. | Enable IMAP view |
| Disable IMAP view for a folder | folders disable-imap-view | To disable IMAP View for the the folder, to make it not accessible from the IMAP Clients. | Disable IMAP view |
| Mark all emails in a folder as READ | folders read | To mark all emails in the folder as Read. | Mark emails as READ |
| Empty folder | folders empty | To delete all emails in the folder. | Empty folder |
| Delete folder | folders delete | To delete the folder along with the emails and sub-folders. | Delete folder |
Label details
The Label details section helps you to get and update information about the label details of a particular user account.
Function | Command | Purpose | Parameters reference link |
| Create a new label | labels create | To create a new Label with the specified name and color. | Create a new label |
| Get all label details | labels list | To get the details of the labels in the account, along with the Label Id details. | List all labels |
| Get a specific label details | labels inspect | To get the details of a particular label, based on the Label Id. | List specific label |
| Update a label | labels update | To rename a particular label with the specified name and/or change the color of the label. | Update a label |
| Delete a label | labels delete | To delete the label and remove the tagging of that label from the emails. | Delete a label |
Email lists and details
The email lists and details section helps you retrieve messages from the user account and access them.
Function | Command | Purpose | Parameters reference link |
| Send an email | message send | To send an email specifying the From, To, Cc, Bcc,Subject, Encoding, and Email format. | Send mail |
| Send an email with attachments | message send --attachments | To send an email with attachments. | Send mail with attachments |
| Upload attachments | message upload-attachment | To upload a file before attaching it with the email. | Upload attachments |
| Save draft/template | message send --mode <draft/template> | To save content as a draft or as a template. | Save draft/template |
| Reply to an email | message reply | To send a reply to an email received | Reply to an email |
| Get all emails in a folder | message list | To get the details of all or a specific set of emails in a folder based on view options. | Retrieve emails in a folder |
| Get emails based on search conditions | message search | To get the list of emails, from the account based on custom search conditions. | Retrieve emails based on search |
| Get email headers | message retrieve-header | To get the email headers of a particular email message, based on the message id. | Retrieve email headers |
| Get email content | message retrieve-content | To get the content of a particular email message, based on the message id. | Retrieve email content |
| Get original message | message retrieve-eml | To get the MIME representation of an email message. | Retrieve original message. |
| Get meta data of a particular email | message inspect | To get the meta data details of a particular email message in the account, based on the message id. | Retrieve meta data of an email |
| Get attachment info | message list-attachment | To get the attachment information of a particular email message in the account, based on the message id. | Retrieve attachment info |
| Get email attachment content | message retrieve-attachment | To get the content stream of attachments in an email. | Retrieve email attachment content |
| Mark emails as read | message read | To mark single/ multiple emails as read, based on the list of message ids passed as parameters. | Mark emails as read |
| Mark emails as unread | message unread | To mark single/ multiple emails as unread, based on the list of message ids passed as parameters | Mark emails as unread |
| Move email | message move | To move a particular email or a group of emails from the existing folder to a different folder. | Move email |
| Flag emails | message flag | To set one among the four available flags to a particular email or a group of emails. | Flag emails |
| Apply labels to emails | message apply-label | To apply a tag to a particular email or a group of emails. | Apply labels |
| Remove labels from an email | message remove-label | To remove a tag from a particular email or a group of emails. | Remove labels |
| Remove all labels from emails | message remove-all-label | To remove all tags from a particular email or a group of emails. | Remove all labels |
| Archive an email | message archive | To archive an email or multiple emails based on the message ids passed as parameters. | Archive an email |
| Unarchive an email | message unarchive | To unarchive an email or multiple emails based on the message ids passed as parameters. | Unarchive an email |
| Mark email as spam | message spam | To mark a particular email or a group of emails as spam. | Mark email as spam |
| Mark email as not spam | message unspam | To mark a particular email or a group of emails as not spam. | Mark email as not spam |
| Delete email | message delete | To delete a particular email or a group of emails. | Delete email |
Signature details
The Signature details section helps you to access and manage signatures in the user account.
Function | Command | Purpose | Parameters reference link |
| Add user signature | signature add | To add a specific signature. | Add signature |
| Update user signature | signature update | To update a specific signature. | Update signature |
| Delete user signature | signature delete | To delete all the available signatures or delete a specific signature. | Delete signature |
Threads details
The Threads details section helps you access and manage threads in the user account.
Function | Command | Purpose | Parameters reference link |
| Flag thread | threads apply-flag | To apply a flag to single/multiple email threads. | Flag thread |
| Move thread | threads move | To move single/multiple threads. | Move thread |
| Apply label to thread | threads apply-label | To apply label(s) to single/multiple email threads. | Apply label |
| Remove label from thread | threads remove-label | To remove label(s) from single/multiple email threads. | Remove label |
| Remove all labels from the thread | threads remove-all-labels | To remove all labels from single/multiple email threads. | Remove all labels |
| Mark thread as READ | threads read | To mark single/multiple email threads as read. | Mark thread as READ |
| Mark thread as UNREAD | threads unread | To mark single/multiple email threads as unread. | Mark thread as UNREAD |
| Mark thread as spam | threads spam | To mark single/multiple threads as spam. | Mark thread as spam |
| Mark thread as not spam | threads not-spam | To mark single/multiple threads as not spam. | Mark thread as not spam |