Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2declare(strict_types=1);
3/**
4 * Pop PHP Framework (https://www.popphp.org/)
5 *
6 * @link       https://github.com/popphp/popphp-framework
7 * @author     Nick Sagona, III <nick@popphp.org>
8 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
9 * @license    https://www.popphp.org/license     New BSD License
10 */
11
12/**
13 * @namespace
14 */
15namespace Pop\Mail\Transport;
16
17use Pop\Mail\Message;
18
19/**
20 * Batch mail transport interface
21 *
22 * Optional companion to TransportInterface. A transport that can send many
23 * messages via a provider's native bulk/batch API endpoint (instead of one
24 * blocking call per message) should also implement this; Mailer prefers it
25 * automatically when sending from a Queue or a directory of saved messages.
26 *
27 * @category   Pop
28 * @package    Pop\Mail
29 * @author     Nick Sagona, III <nick@popphp.org>
30 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
31 * @license    https://www.popphp.org/license     New BSD License
32 * @version    5.0.0
33 */
34interface BatchTransportInterface
35{
36
37    /**
38     * Send multiple messages in as few underlying calls as the transport supports
39     *
40     * @param  Message[] $messages
41     * @return int number of messages sent
42     */
43    public function sendBatch(array $messages): int;
44
45}