I put that function on the transpotbuilder
file in core file , but it has still error:
Fatal error: Class 'Magento\Framework\Mail\Template\Zend_Mime' not found in /var/www/html/vendor/magento/framework/Mail/Template
public function addAttachment(
$body,
$mimeType = Zend_Mime::TYPE_OCTETSTREAM,
$disposition = Zend_Mime::DISPOSITION_ATTACHMENT,
$encoding = Zend_Mime::ENCODING_BASE64,
$filename = null
) {
$this->message->createAttachment($body, $mimeType, $disposition, $encoding, $filename);
return $this;
}
I added this function in core file and try to send attachment email and I got the Above error.