Skip to content

Search box does not perform search in Web UI, but /api/Messages?searchTerms= endpoint works #2110

Description

@cdesign

I have two servers with smtp4dev installed. One is on 3.15 the other is 3.16. On both servers, I cannot get the Search field to filter emails. I assume this must be a config/setup issue, but I find nothing related to search in the config. Below are the details from the 3.15 server. Thx!

Environment

  • smtp4dev Version: 3.15.0+91996a4bf4a57a3ba48df4a70fff7c519482216a
  • Browser: Microsoft Edge
  • Windows Server deployment
  • Installed from ZIP package and running as a Windows Service

Problem

The Search field in the Messages view does not perform any search.

Typing a value and pressing Enter has no effect on the message list. No network request is sent by the browser and the displayed messages do not change.

Expected Behavior

Entering a search term and pressing Enter (or otherwise activating search) should either:

  • Filter the currently displayed messages, or
  • Send a request to the backend search endpoint and display matching results.

Actual Behavior

  • The search input accepts text normally.
  • Keyboard events are received by the input element.
  • Pressing Enter does nothing.
  • No HTTP request is generated by the UI.
  • The message list remains unchanged.

Investigation Performed

The search input has active event listeners attached:

  • input
  • keydown
  • change
  • composition events

Using browser developer tools, the following events are observed:

keydown t
input t
keydown e
input te
keydown s
input tes
keydown t
input test
keydown Enter

This confirms that the input field receives keyboard events correctly.

Backend Search Test

The backend search API appears to function correctly.

Request:

GET /api/Messages?searchTerms=test&mailboxName=Default&sortIsDescending=true

Example response:

{
  "results": [
    {
      "subject": "Test Message",
      "from": "sender@example.com",
      "to": ["recipient@example.com"]
    }
  ]
}

The endpoint returns the expected filtered results.

This suggests that the issue is in the Web UI search implementation rather than the backend API.

Additional Notes

I initially tested on version:

3.16.0-ci20260312122+pr1467...

and observed the same behavior.

I then downgraded to:

3.15.0+91996a4bf4a57a3ba48df4a70fff7c519482216a

and the issue remained.

Because the API endpoint works correctly, it appears that the search field is not invoking the search/filter logic in the UI.

Browser Console Errors

The following errors are present in the browser console:

ElementPlusError: [ElOnlyChild] no valid child node found

and

TypeError: Cannot read properties of undefined (reading 'size')

These errors occur within the Vue/Element Plus frontend components and may be related.

Reproduction Steps

  1. Open smtp4dev Web UI.
  2. Navigate to Messages.
  3. Enter a search term known to exist in a message subject.
  4. Press Enter.
  5. Observe that:
    • No network request is generated.
    • The message list does not change.
    • The backend API search endpoint continues to return correct results when called directly.

Questions

  • Is pressing Enter expected to trigger search in the current UI?
  • Is the search intended to be client-side filtering only?
  • Is there a known issue affecting the search input in the current Vue/Element Plus frontend?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions