uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
MIT License
7.32k stars 452 forks source link

Mailbox / Email refresh not working #589

Closed codefreak558 closed 1 year ago

codefreak558 commented 1 year ago

When running php bin/console uvdesk:refresh-mailbox support@example.com I get the following error:

 1. Processing uvdesk mailbox configuration.
 Mailbox for email support@example.com not found.

However I have already setup that email.

I don't think I've done anything wrong my env is set to production.

image

komal-sh-27 commented 1 year ago

Try once with a clear cache of your project.

Run this command for the clear cache of the project: php bin/console c:c

If you still have the same issue let us know.

codefreak558 commented 1 year ago

I have cleared the cache and now the error that it is spitting out is

1. Processing uvdesk mailbox configuration.

 2. Opening imap stream...
10:47:01 WARNING   [php] Warning: imap_open(): Couldn't open stream mail.darkblue.co.za ["exception" => ErrorException { …}]

 3. IMAP stream opened.
komal-sh-27 commented 1 year ago

Try once with you delete all set up of your swift mailer, and mailbox settings, and change the .env file in dev mode then the clear cache of your project.

Now again set up the swift mailer and mailbox settings in the dev mode. Again run the refresh command for tickets fetch and once these settings work fine then again change the env file in prod mode.

codefreak558 commented 1 year ago

So I'm getting a new error after doing that

2. Opening imap stream...

In RefreshMailboxCommand.php line 93:

  Warning: imap_open(): Couldn't open stream mail.darkblue.co.za

uvdesk:refresh-mailbox [-t|--timestamp TIMESTAMP] [--] [<emails>...]

PHP Fatal error:  Uncaught ErrorException: Notice: Unknown: Can't open mailbox mail.darkblue.co.za: no such mailbox (errflg=2) in Unknown:0
Stack trace:
#0 [internal function]: Symfony\Component\ErrorHandler\ErrorHandler->handleError()
#1 {main}
  thrown in Unknown on line 0 
vipin-shrivastava commented 1 year ago

@codefreak558

your imap configuration is not correct that's why you are getting the above error. Check your imap configuration & try again.

If you still facing the same issue then mail us at support@uvdesk.com with your query. Our team will help you.

codefreak558 commented 1 year ago

I have checked my imap and the smtp settings and they are correct for what my email provider says it should be.

So in the error you see the imap host is mail.darkblue.co.za however it can also be dedi12.cpt2.host-h.net and it will work fine. I have tried with that host and it gave the same error.

image image

vipin-shrivastava commented 1 year ago

@codefreak558

your host in imap should be like this {mail.darkblue.co.za:993/imap/ssl}INBOX

codefreak558 commented 1 year ago

@vipin-shrivastava

Okay thanks it is working now

codefreak558 commented 1 year ago

@vipin-shrivastava

Okay so I changed it to prod and its now giving a new error:

 1. Processing uvdesk mailbox configuration.

 2. Opening imap stream...

 3. IMAP stream opened.

 4. Fetching Email collection since 03 August 2022.

 5. Total fetched email -> 1

 6. Starting to convert Emails into Tickets ->
=============================================
=============================================

  Converting email 1 out of 1.

  Error -> 403 Forbidden
vipin-shrivastava commented 1 year ago

@codefreak558

Is this only giving error on prod mode?

codefreak558 commented 1 year ago

I will check now I'll change it to dev mode now and test and see

codefreak558 commented 1 year ago

No it does the same error in dev mode as well

vipin-shrivastava commented 1 year ago

@codefreak558

Request not able to hit the end point, you can try by whitelist URL on your server. URL: https://domain.com/your_project_name/public/mailbox/listener

codefreak558 commented 1 year ago

I am not too sure what url you are trying to point to.

The mail server and the hosting server are on the same server, whenever I want to open up webmail for the emails I get a final url of: https://webmail7.konsoleh.co.za/?_task=mail&_mbox=INBOX

vipin-shrivastava commented 1 year ago

@codefreak558

Follow the below steps then you can understand what i am taking about:

  1. Open RefreshMailboxCommand.php in your project from path: your_project_name/vendor/uvdesk/mailbox-component/Console/RefreshMailboxCommand.php
  2. Now, put dump($requestUrl); die; on line no. 138 image
  3. Save the file & run the refershMailbox command in your project root directory.
  4. After run the command you can see a url. (eg. https://domain.com/your_project_name/public/mailbox/listener)
  5. Now you have to whitelist this url on your server.
codefreak558 commented 1 year ago

@vipin-shrivastava

Okay so I've put dump($requestUrl); die; on line 138 and when doing a mailbox refresh the url I get it: https://support.darkblue.co.za/public//mailbox/listener and if you go to that specific page it doesnt work however when getting rid of the extra / it gives out a page that just says 200

codefreak558 commented 1 year ago

@vipin-shrivastava

I am currently looking around in the folders to try and see if there is somewhere in the code where it is making it so that there is the extra slash in the url is there anyway I'd fix this as it looks like if it is able to get to that page properly it should work

komal-sh-27 commented 1 year ago

Your issue is resolved now or not? If the issue is still let us know.

codefreak558 commented 1 year ago

Hi, no it is still not working.

komal-sh-27 commented 1 year ago

If you still facing the same issue then mail us at support@uvdesk.com with your query and screenshot of the errors. Our team will help you.

komal-sh-27 commented 1 year ago

We are not getting any reply or ticket from your side so we are closing this issue. If you have any queries so reply in the same thread or mail us at support@uvdesk.com.