Function __global->_find_mail_bounces

Definitions

sources/mail2.php

  • Find bounces in an IMAP/POP3 folder.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$host string No No required parameter N/A N/A The server hostname
$port integer No No required parameter N/A N/A The port
$type ?string No No required parameter imap imaps imaps_nocert pop3 pop3s pop3s_nocert N/A The protocol (null: use configured / autodetect)
$folder string No No required parameter N/A N/A The inbox identifier
$username string No No required parameter N/A N/A The username
$password string No No required parameter N/A N/A The password
$bounces_only boolean No No True N/A N/A Only find bounces (otherwise will find anything)
$since ?TIME No No Null N/A N/A Only find bounces since this date (null: no limit). This is approximate, we will actually look from a bit further back to compensate for possible timezone differences

Returns

  • Bounces (a map between email address and details of the bounce)
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find bounces in an IMAP/POP3 folder.
 *
 * @param  string $host The server hostname
 * @param  integer $port The port
 * @param  ?string $type The protocol (null: use configured / autodetect)
 * @set imap imaps imaps_nocert pop3 pop3s pop3s_nocert
 * @param  string $folder The inbox identifier
 * @param  string $username The username
 * @param  string $password The password
 * @param  boolean $bounces_only Only find bounces (otherwise will find anything)
 * @param  ?TIME $since Only find bounces since this date (null: no limit). This is approximate, we will actually look from a bit further back to compensate for possible timezone differences
 * @return array Bounces (a map between email address and details of the bounce)
 */

function _find_mail_bounces(string $host, int $port, ?string $type, string $folder, string $username, string $password, bool $bounces_only = true, ?int $since = null) : array