/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Mailer
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Mailer/AbstractTransport.php (2098B)
*/
protected $_defaultConfig = [];
/**
* Send mail
*
* @param \Cake\Mailer\Message $message Email message.
* @return array
* @psalm-return array{headers: string, message: string}
*/
abstract public function send(Message $message): array;
/**
* Constructor
*
* @param array
$config Configuration options.
*/
public function __construct(array $config = [])
{
$this->setConfig($config);
}
/**
* Check that at least one destination header is set.
*
* @param \Cake\Mailer\Message $message Message instance.
* @return void
* @throws \Cake\Core\Exception\CakeException If at least one of to, cc or bcc is not specified.
*/
protected function checkRecipient(Message $message): void
{
if (
$message->getTo() === []
&& $message->getCc() === []
&& $message->getBcc() === []
) {
throw new CakeException(
'You must specify at least one recipient.'
. ' Use one of `setTo`, `setCc` or `setBcc` to define a recipient.'
);
}
}
}