# Advanced Search

Advanced Search provides powerful filtering options to find specific emails quickly. Use multiple criteria to narrow down results and locate exactly what you need.

***

## 🎯 What is Advanced Search?

Advanced Search allows you to search emails using:

* Multiple criteria simultaneously
* Specific fields (From, Subject, Body, etc.)
* Date ranges
* Tags and labels
* Read status
* Attachment presence

**Benefits:**

* Find emails faster
* Combine multiple search criteria
* Filter by specific attributes
* Search across all folders

***

## ✅ Prerequisites

Advanced Search must be enabled in **Setup → Settings → Mailbox Settings → Enable Advanced Search**.

***

## 🔍 Accessing Advanced Search

### Method 1: Search Bar

1. Navigate to **Mailbox → Emails**
2. Click the **Advanced Search** button (usually next to the search bar)
3. Advanced search panel will expand

### Method 2: Search Icon

1. Look for the search/filter icon in the mailbox interface
2. Click to open advanced search options

***

## 📋 Search Criteria

### From (Sender)

Search by email sender:

* Enter email address: `john@example.com`
* Enter domain: `@example.com`
* Enter name: `John Smith`

**Examples:**

* `support@` - Find all emails from support addresses
* `@company.com` - Find all emails from company domain

***

### Subject

Search in email subject lines:

* Enter keywords: `invoice`, `urgent`, `meeting`
* Use partial matches: `inv` finds "invoice", "invitation", etc.

**Examples:**

* `invoice` - Find all emails with "invoice" in subject
* `[URGENT]` - Find urgent emails

***

### Body (Content)

Search in email body/content:

* Enter keywords or phrases
* Searches through entire email text

**Examples:**

* `project deadline` - Find emails mentioning project deadline
* `payment received` - Find payment confirmations

***

### To (Recipient)

Search by recipient:

* Your email address
* Other recipients in To/CC fields

***

### Tags

Filter by email tags/labels:

* Select one or more tags from dropdown
* Shows only emails with selected tags

**Examples:**

* Select "Support" tag - Shows only support emails
* Select multiple tags - Shows emails with any selected tag

***

### Date Range

Filter by date:

* **From Date**: Start of date range
* **To Date**: End of date range
* Select dates using date picker

**Examples:**

* Last week: Set From/To dates for last 7 days
* This month: Set From/To dates for current month
* Specific period: Set custom date range

***

### Read Status

Filter by read status:

* **Read**: Show only read emails
* **Unread**: Show only unread emails
* **All**: Show both read and unread

***

### Has Attachment

Filter by attachment presence:

* **Yes**: Show only emails with attachments
* **No**: Show only emails without attachments
* **All**: Show both

***

## 🔎 Performing a Search

### Step 1: Enter Criteria

1. Open Advanced Search panel
2. Fill in the criteria you want to search for
3. You can use one or multiple criteria

### Step 2: Apply Filters

1. Click **Search** or **Apply Filters** button
2. Results will update to show matching emails
3. Search criteria remain visible for easy modification

### Step 3: Clear Search

1. Click **Clear** or **Reset** button
2. All filters are removed
3. Full email list is displayed again

***

## 💡 Search Tips

### Combine Criteria

Use multiple criteria for precise results:

* **From**: `support@` AND **Subject**: `urgent` = Support urgent emails
* **Tags**: "VIP" AND **Date**: Last 7 days = Recent VIP emails
* **Has Attachment**: Yes AND **Read Status**: Unread = Unread emails with attachments

### Use Partial Matches

* `inv` matches "invoice", "invitation", "inventory"
* `@company` matches all emails from company domain
* `support` matches "support", "Support", "SUPPORT" (case-insensitive)

### Date Ranges

* Use specific dates for precise filtering
* Use date ranges to find emails from periods
* Combine with other criteria for better results

***

## 📊 Search Results

### Viewing Results

* Results appear in the email list
* Matching criteria are highlighted
* Results are sorted by date (newest first)

### Refining Results

* Modify search criteria and search again
* Add more criteria to narrow results
* Remove criteria to broaden results

***

## 🔄 Saving Searches

While the module doesn't have saved searches, you can:

* Bookmark specific search URLs (if supported)
* Use Email Rules to automatically tag emails matching criteria
* Create tags for frequently searched categories

***

## ⚠️ Important Notes

* Advanced Search searches across all folders (Inbox, Sent, Archive, etc.)
* Search is case-insensitive
* Partial matches are supported
* Multiple criteria use AND logic (all must match)
* Advanced Search feature must be enabled in Settings

***

## 🔗 Related Documentation

* [Email Tags (Labels)](https://themesic-docs.gitbook.io/mailbox-module-for-perfex/operational-guide/email-tags-labels) - Use tags in search
* [Organizing Emails](https://themesic-docs.gitbook.io/mailbox-module-for-perfex/operational-guide/organizing-emails) - General organization tips
* [Creating Email Rules](https://themesic-docs.gitbook.io/mailbox-module-for-perfex/operational-guide/creating-email-rules) - Auto-tag based on search criteria
* [Settings Reference](https://themesic-docs.gitbook.io/mailbox-module-for-perfex/settings-reference) - Enable Advanced Search
