伙计们,我有这个通常由 DOMPDF 提供的 PHP 代码
$message = Swift_Message::newInstance()
->setSubject('How To Create and Send An HTML Email w/ a PDF Attachment')
->setTo(array($post->email => $post->name)) // Array of people to send to
->setFrom(array('no-reply@net.meetme.com' => 'Nirmohi+')) // From:
->setBody($html_message, 'text/html')
->attach(Swift_Attachment::newInstance($pdf_content, 'nettuts.pdf', 'application/pdf'));
我想动态更改主题名称和 PDF 名称......就像......
$message = Swift_Message::newInstance()
->setSubject('A New Mail Received Frome "NAMEID"')
->setTo(array('MYEMAIL@gmail.com' => $post->name))
->setFrom(array('no-reply@net.meetme.com' => $post->name))
->setBody($html_message, 'text/html')
->attach(Swift_Attachment::newInstance($pdf_content, 'SMILE.pdf', 'application/pdf'));
我想从我的 HTML 表单中获取数据。例如。
<input id="NAMEID">
<input id="SMILE">
我是 PHP 新手……请尽快帮助我……