How do I attach an invoice PDF to an email in the Dukapress plugin for WordPress?
function dpsc_pnj_send_mail($to, $from, $name, $subject, $msg, $attachment = FALSE) { global $wpdb; $headers=”MIME-Version: 1.0″ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”; $headers .= ‘From: ‘ . $name . ‘ ‘ . $from . ” . “\r\n”; if ($attachment) { if ($dp_shopping_cart_settings[‘dp_shop_pdf_generation’] === ‘checked’) { $mail_attachment = array(DP_PLUGIN_DIR. ‘/pdf/invoice_’ . $attachment . ‘.pdf’); @wp_mail($to, … Read more