Home › Forums › Quform WordPress › Matching the form layout in your email or PDF output › Reply To: Matching the form layout in your email or PDF output
we are getting closer now. Need help with the following:
I am able to create PDF by custom code as the required structure. But I am stuck in sending the generated pdf file as attachment into the email notification. Can you please post a support ticket and ask how can we attach a file inside this hook.
add_action(‘quform_pre_send_notification_2_2’, function ($mailer, Quform_Notification $notification, Quform_Form $form) {
ob_start();
include _DIR_ . ‘/email-content.php’;
$mailer->Body = ob_get_clean();
}, 10, 3);I was trying this $notification->setConfig(‘attachments’,array(0 => _DIR_ . ‘/Document.pdf’));
Please ask them what is the right way.