<?php
/******************************************************************************
 *   ______                                                                   *
 *  /       \                                                                 *
 * /$$$$$$  | ________  __    __   ______    ______                           *
 * $$ |__$$ |/        |/  |  /  | /      \  /      \                          *
 * $$    $$ |$$$$$$$$/ $$ |  $$ |/$$$$$$  |/$$$$$$  |                         *
 * $$$$$$$$ |  /  $$/  $$ |  $$ |$$ |  $$/ $$    $$ |                         *
 * $$ |  $$ | /$$$$/__ $$ \__$$ |$$ |      $$$$$$$$/                          *
 * $$ |  $$ |/$$      |$$    $$/ $$ |      $$       |                         *
 * $$/   $$/ $$$$$$$$/  $$$$$$/  $$/        $$$$$$$/                          *
 *                                                                            *
 * @PROJECT    : 3D Preview Extension [Magetop.com]                           *
 * @AUTHOR     : Azure - Developer                                            *
 * @COPYRIGHT  : © 2019  Magetop.com                                          *
 * @LINK       : https://Magetop.com                                          *
 * @CREATED    :  10/01/2022                                                  *
 ******************************************************************************/

namespace Magetop\Advancepreview\Model\ReWrite\Mail;


class TransportBuilder extends \Magento\Framework\Mail\Template\TransportBuilder
{
    /**
     * addAttachment
     *
     * @param mixed $body
     * @param string $filename
     * @param mixed $mimeType
     * @param mixed $disposition
     * @param mixed $encoding
     * @return object
     */
    public function addAttachment(
        $body,
        $filename = '',
        $mimeType = \Zend_Mime::TYPE_OCTETSTREAM,
        $disposition = \Zend_Mime::DISPOSITION_ATTACHMENT,
        $encoding = \Zend_Mime::ENCODING_BASE64

    ) {
        $attachmentPart = new \Zend_Mime_Part($body);
        $attachmentPart->type = $mimeType;
        $attachmentPart->disposition = $disposition;
        $attachmentPart->encoding = $encoding;
        $attachmentPart->filename = $filename;
        return $this;
    }
}
