PHPMailer\PHPMailer

PHPMailer::cidExistsprotectedWP 1.0

Check if an embedded attachment is present with this cid.

Method of the class: PHPMailer{}

No Hooks.

Returns

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->cidExists( $cid );
$cid(string) (required)
.

PHPMailer::cidExists() code WP 6.8.1

protected function cidExists($cid)
{
    foreach ($this->attachment as $attachment) {
        if ('inline' === $attachment[6] && $cid === $attachment[7]) {
            return true;
        }
    }

    return false;
}