WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

PHPMailer\PHPMailer

PHPMailer::addStringEmbeddedImage() public WP 1.0

Add an embedded stringified attachment. This can include images, sounds, and just about any other document type. If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type.

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

Хуков нет.

Возвращает

true|false. True on successfully adding an attachment

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

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

Код PHPMailer::addStringEmbeddedImage() WP 5.7.1

<?php
public function addStringEmbeddedImage(
    $string,
    $cid,
    $name = '',
    $encoding = self::ENCODING_BASE64,
    $type = '',
    $disposition = 'inline'
) {
    try {
        //If a MIME type is not specified, try to work it out from the name
        if ('' === $type && !empty($name)) {
            $type = static::filenameToType($name);
        }

        if (!$this->validateEncoding($encoding)) {
            throw new Exception($this->lang('encoding') . $encoding);
        }

        //Append to $attachment array
        $this->attachment[] = [
            0 => $string,
            1 => $name,
            2 => $name,
            3 => $encoding,
            4 => $type,
            5 => true, //isStringAttachment
            6 => $disposition,
            7 => $cid,
        ];
    } catch (Exception $exc) {
        $this->setError($exc->getMessage());
        $this->edebug($exc->getMessage());
        if ($this->exceptions) {
            throw $exc;
        }

        return false;
    }

    return true;
}