community-skeleton icon indicating copy to clipboard operation
community-skeleton copied to clipboard

Mailbox / Email refresh not working

Open codefreak558 opened this issue 2 years ago • 20 comments

When running php bin/console uvdesk:refresh-mailbox [email protected] I get the following error:

 1. Processing uvdesk mailbox configuration.
 Mailbox for email [email protected] 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

codefreak558 avatar Aug 03 '22 18:08 codefreak558

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.

komal-sh-27 avatar Aug 04 '22 08:08 komal-sh-27

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.

codefreak558 avatar Aug 04 '22 09:08 codefreak558

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.

komal-sh-27 avatar Aug 04 '22 09:08 komal-sh-27

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 

codefreak558 avatar Aug 04 '22 10:08 codefreak558

@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 [email protected] with your query. Our team will help you.

vipin-shrivastava avatar Aug 04 '22 11:08 vipin-shrivastava

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

codefreak558 avatar Aug 04 '22 11:08 codefreak558

@codefreak558

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

vipin-shrivastava avatar Aug 04 '22 11:08 vipin-shrivastava

@vipin-shrivastava

Okay thanks it is working now

codefreak558 avatar Aug 04 '22 11:08 codefreak558

@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

codefreak558 avatar Aug 04 '22 11:08 codefreak558

@codefreak558

Is this only giving error on prod mode?

vipin-shrivastava avatar Aug 04 '22 12:08 vipin-shrivastava

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

codefreak558 avatar Aug 04 '22 12:08 codefreak558

No it does the same error in dev mode as well

codefreak558 avatar Aug 04 '22 12:08 codefreak558

@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

vipin-shrivastava avatar Aug 04 '22 12:08 vipin-shrivastava

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

codefreak558 avatar Aug 04 '22 12:08 codefreak558

@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.

vipin-shrivastava avatar Aug 04 '22 13:08 vipin-shrivastava

@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 avatar Aug 04 '22 13:08 codefreak558

@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

codefreak558 avatar Aug 04 '22 15:08 codefreak558

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

komal-sh-27 avatar Sep 02 '22 09:09 komal-sh-27

Hi, no it is still not working.

codefreak558 avatar Sep 11 '22 10:09 codefreak558

If you still facing the same issue then mail us at [email protected] with your query and screenshot of the errors. Our team will help you.

komal-sh-27 avatar Sep 12 '22 04:09 komal-sh-27

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 [email protected].

komal-sh-27 avatar Oct 03 '22 09:10 komal-sh-27