Environment (please complete the following information):
PHP IMAP version: [newest]
PHP Version: [8]
Type of execution: [WebServer]
Hi,
I can´t get emails, but no error is shown, but when using classic IMAP it works:
$connection = imap_open('{'.$mailserver.':993/imap/ssl}INBOX', $email, $password);
$emailstemp = imap_search($connection,'SINCE "'.$start.'" BEFORE "'.$end.'"');
var_dump($emailstemp);
----> Works, shows me emails
$mailbox = new PhpImap\Mailbox(
'{'.$mailserver.':993/imap/ssl}INBOX', // IMAP server and mailbox folder
$email, // Username for the before configured mailbox
$password, // Password for the before configured username
__DIR__, // Directory, where attachments will be saved (optional)
'UTF-8', // Server encoding (optional)
true, // Trim leading/ending whitespaces of IMAP path (optional)
true // Attachment filename mode (optional; false = random filename; true = original filename)
);
$mailbox->setAttachmentsIgnore(true);
// set some connection arguments (if appropriate)
$mailbox->setConnectionArgs(
CL_EXPUNGE // expunge deleted mails upon mailbox close
//| OP_SECURE // don't do non-secure authentication
);
try
{
$mailsIds = $mailbox->searchMailbox('SINCE "'.$start.'" BEFORE "'.$end.'"');
var_dump($mailIds);
}
---> Gives me NULL, also when search with 'ALL' gives me NULL
Environment (please complete the following information):
Hi, I can´t get emails, but no error is shown, but when using classic IMAP it works: