Skip to content
Snippets Groups Projects
Unverified Commit 87dab41a authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #16231 from mfb/imap-batch-size

Remove patch hunk now that zetacomponents/Mail#73 has been merged
parents a0993d15 bd63411f
Branches
Tags
No related merge requests found
......@@ -48,7 +48,11 @@ class CRM_Mailing_MailStore_Imap extends CRM_Mailing_MailStore {
}
$options = ['ssl' => $ssl, 'uidReferencing' => TRUE];
$options = [
'listLimit' => defined('MAIL_BATCH_SIZE') ? MAIL_BATCH_SIZE : 1000,
'ssl' => $ssl,
'uidReferencing' => TRUE,
];
$this->_transport = new ezcMailImapTransport($host, NULL, $options);
$this->_transport->authenticate($username, $password);
$this->_transport->selectMailbox($folder);
......
......@@ -2444,12 +2444,12 @@
"source": {
"type": "git",
"url": "https://github.com/zetacomponents/Mail.git",
"reference": "b60e9a543f6c3d9a9ec74452d4ff5736a1c63a77"
"reference": "ed8783fd63a4fab6e8a5d87390d83150cc993e27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zetacomponents/Mail/zipball/b60e9a543f6c3d9a9ec74452d4ff5736a1c63a77",
"reference": "b60e9a543f6c3d9a9ec74452d4ff5736a1c63a77",
"url": "https://api.github.com/repos/zetacomponents/Mail/zipball/ed8783fd63a4fab6e8a5d87390d83150cc993e27",
"reference": "ed8783fd63a4fab6e8a5d87390d83150cc993e27",
"shasum": ""
},
"require": {
......@@ -2504,19 +2504,19 @@
{
"name": "Alexandru Stanoi"
},
{
"name": "Christian Michel"
},
{
"name": "Sinisa Dukaric"
},
{
"name": "Mikko Koppanen"
},
{
"name": "Christian Michel"
}
],
"description": "The component allows you construct and/or parse Mail messages conforming to the mail standard. It has support for attachments, multipart messages and HTML mail. It also interfaces with SMTP to send mail or IMAP, POP3 or mbox to retrieve e-mail.",
"homepage": "https://github.com/zetacomponents",
"time": "2019-02-13T11:33:09+00:00"
"time": "2020-01-08T10:36:37+00:00"
}
],
"packages-dev": [
......
diff --git a/src/transports/imap/imap_transport.php b/src/transports/imap/imap_transport.php
index 94837cd..1542673 100644
--- a/src/transports/imap/imap_transport.php
+++ b/src/transports/imap/imap_transport.php
@@ -1012,7 +1012,9 @@ class ezcMailImapTransport
{
// get the sizes of the messages
$tag = $this->getNextTag();
- $query = trim( implode( ',', $messageList ) );
+ $mailBatchSize = defined('MAIL_BATCH_SIZE') ? MAIL_BATCH_SIZE : 1000;
+ $truncatedMessageList = array_slice($messageList, 0, $mailBatchSize);
+ $query = trim( implode( ',', $truncatedMessageList ) );
$this->connection->sendData( "{$tag} FETCH {$query} RFC822.SIZE" );
$response = $this->getResponse( 'FETCH (' );
$currentMessage = trim( reset( $messageList ) );
diff --git a/tests/tutorial_examples.php b/tests/tutorial_examples.php
index 3acadc3..06f1e71 100644
--- a/tests/tutorial_examples.php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment