send 3 email each with attachment |
Hi , sorry for english , i create a function :
PHP Code: public function send_email($email, $subject,$messaggio_formattato,$attachment=null) in a controller function i create a pdf with fpdf and save a temporany file : $pdf_filename = "order_".$res_order.".pdf"; $pdf->Output($pdf_filename, "F"); Than i send 3 email . $this->send_email($this->config->item('email_admin'), $subject,$messaggio_formattato,$pdf_filename); $this->send_email($agente->email, lang('ordini_ordini_inviato'), lang('ordini_ordini_inviato_messaggio') ,$pdf_filename); $this->send_email($user->email, lang('ordini_ordini_inviato'), lang('ordini_ordini_inviato_messaggio_user') ,$pdf_filename); In first email i have an attachment , in second two attachment in third 3 attachment.....Why ?
Probably because send() clears all the properties unless you tell it not to. Change the last line to
PHP Code: return $this->email->send(false);
(11-06-2019, 05:44 PM)dave friend Wrote: Probably because send() clears all the properties unless you tell it not to. Change the last line to Same error , 1 2 and 3 attachment with false too. (11-07-2019, 04:57 AM)pippuccio76 Wrote:(11-06-2019, 05:44 PM)dave friend Wrote: Probably because send() clears all the properties unless you tell it not to. Change the last line to Now work ... in the function send_email under load library i insert this : $this->email->clear(TRUE); |
Welcome Guest, Not a member yet? Register Sign In |