| Current Path : /var/www/consult-e-syn/public_html/plugins/ats/mailfetch/library/ |
| Current File : /var/www/consult-e-syn/public_html/plugins/ats/mailfetch/library/MailClientInterface.php |
<?php
/**
* @package ats
* @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Akeeba\TicketSystem\MailFetch;
defined('_JEXEC') or die;
use Exception;
/**
* An abstracted mail checker interface for processing unread mail
*
* @since 3.2.0
*/
interface MailClientInterface
{
/**
* Creates the mail client object.
*
* This method accepts the following parameters:
* mailbox_type Mail server type: 'pop3' or 'imap'
* server Mail server's hostname
* port [optional] Mail server's port
* ssl [optional] Use IMAPS/POP3S?
* tls [optional] Use TLS instead of SSL? 0 = never, 1 = if available, 2 = always
* validate_certificate [optional] True to validate the certificate of the remote server. Default: false.
* username Login username to the mail server
* password Login password to the mail server
* folder [optional] IMAP mailbox. Default: 'INBOX'
* deleteAfter [optional] Should I delete handled emails? Default: true
* expunge [optional] Should I expunge the mailbox on disconnect? Default: true
*
* @param array $params
*
* @return void
* @since 3.2.0
*/
public function __construct(array $params = []);
/**
* Runs the callback against all unread messages since the date specified.
*
* If the callback returns TRUE the message is also marked as Seen (read) on the IMAP server.
*
* The callback must follow one of the following prototypes:
*
* function(MailMessage $msg): bool
* function(array $msg): bool
*
* @param callable $callback The callback to execute
* @param null $since Null for all unread, '' for recent, date/time string for mail newer than this date
*
* @return void
* @since 3.2.0
* @throws Exception
*/
public function iterateUnread(callable $callback, $since = null);
}