Hamdi ben henda Posted August 19, 2019 Share Posted August 19, 2019 Hello, Can anyone please help me , i would like to attache a generated Barcode image (png) in the order_conf email : i started by generate the barcode image : $barcodeobj = new TCPDFBarcode($order->order_barcode, 'C128');$barcode = base64_encode($barcodeobj->getBarcodePNG(1, 30, array(255,255,255))); and then : Mail::Send( (int) $order->id_lang, 'order_conf', Context::getContext()->getTranslator()->trans( 'Order confirmation', array(), 'Emails.Subject', $orderLanguage->locale ), $data, $this->context->customer->email, $this->context->customer->firstname . ' ' . $this->context->customer->lastname, null, null,$barcode, null, _PS_MAIL_DIR_, false, (int) $order->id_shop ); also i tried to attache it like this but i didn't work : $extra_pdf = array(); $extra_pdf['content'] = $barcode.'.png'; $extra_pdf['name'] = 'barcode.png'; $extra_pdf['mime'] = 'image/png'; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now