Emails are not being fetched for any mailbox after moving osTicket to new server hardware (VM copy). PHP temp dir not writable in Windows.
Set a custom PHP temp directory in php.ini (sys_temp_dir and upload_tmp_dir) pointing to a folder where the IIS application pool user has full write access. Do not rely on C:\Windows\Temp. After changing, restart IIS. On Windows, this is the most common cause of email fetching and OAuth token storage failures after server migration. Also check that OAuth2 tokens are still valid (Admin > Emails > [email] > Remote Mailbox > Config > Token tab should show green/valid expiry).
Originally sourced from forum.osticket.com . osFAQ.org summarises community knowledge for quick reference.
Helpful
Report an error