PHPMailer\PHPMailer

PHPMailer::attachmentExists()publicWP 1.0

Check if an attachment (non-inline) is present.

Метод класса: PHPMailer{}

Хуков нет.

Возвращает

true|false.

Использование

$PHPMailer = new PHPMailer();
$PHPMailer->attachmentExists();

Код PHPMailer::attachmentExists() WP 6.5.2

public function attachmentExists()
{
    foreach ($this->attachment as $attachment) {
        if ('attachment' === $attachment[6]) {
            return true;
        }
    }

    return false;
}