o4oren / Ad-Hoc-Email-Server

An ad-hoc disposable temporary mail server. Create and use ad hoc disposable mailboxes for testing or any other purpose.
Apache License 2.0
381 stars 92 forks source link

Not able to get the list of mailboxes using /api/mailbox/autocomplete #59

Closed writetoyogi closed 2 years ago

writetoyogi commented 2 years ago

Hello,

As per GitHub documentation, trying to get list of mailboxes using POST API call '/api/mailbox/autocomplete'

http://mydomain.com/api/mailbox/autocomplete?prefix=test

However it doesn't give any result, response status is 200 OK. Tried to pass the param 'prefix' in all possible ways but same issue. Please can anyone guide on how to get list of mailboxes.

Thank you !

o4oren commented 2 years ago

Hi, I haven't touched this project in a while, but there is a configuration property to enable autocomplete. I think it is off by default.

writetoyogi commented 2 years ago

Thanks for your response @o4oren ! I did check back on the property, it is set as 'true'

allowAutocomplete=true

However, did not get anything in the response. What we need to pass in param 'prefix'? Will that have any impact on the response?

o4oren commented 2 years ago

Make an api call to /properties ans make sure allowAutocomolete is true. If it is, I think the first 2 or more letters of a user email that exists and has emails shoukd return a list of matching emails.

writetoyogi commented 2 years ago

I got the issue, I was passing the 'prefix' as Query Params however when I pass it as 'Body' param, it worked like a charm 👍🏻

Thanks a lot @o4oren, it made my day 💯 !

writetoyogi commented 2 years ago

Worked Perfectly !