我正在将PDF附加到电子邮件中,PDF是通过mPDF生成的,并且可以完美生成。但是,当我尝试使用Swift Mailer将其附加到电子邮件中时,总是出现Swift_Attachment class not found
代码
require __DIR__.'/swiftmailer/lib/classes/Swift.php';
$attachment = new Swift_Attachment($html, 'phpflow.pdf', 'application/pdf');
$message = Swift_Message::newInstance()
->setSubject('Here is the subject')
->setFrom(array('john@doe.com' => 'John Doe'))
->setTo(array('acb@gmail.com'))
->setBody('Here is the message itself')
->attach($attachment);
$transport = Swift_MailTransport::newInstance();
$mailer = Swift_Mailer::newInstance($transport);
$mailer->send($message);
$mpdf->Output($filename ,'I');
我不知道这是怎么回事,建议我