attach multiple file in email - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: attach multiple file in email (/showthread.php?tid=68928) |
attach multiple file in email - eleumas - 09-14-2017 I would like attach the files uploaded from my form to email. The files are correctly uploaded in the folder but the email has only 1 attachment. How can i solve this problem? Thanks. My code: PHP Code: $config['upload_path'] = './media/images/uploads/'; RE: attach multiple file in email - InsiteFX - 09-14-2017 You can attach as many files as you like, just cascade them. $this->email->attach($full_path_and_name); $this->email->attach($full_path_and_name); In your case if your using the FILES array you would need to attach them inside of a for loop, getting the file path and name into a string variable. RE: attach multiple file in email - eleumas - 09-14-2017 (09-14-2017, 08:47 AM)InsiteFX Wrote: You can attach as many files as you like, just cascade them. Thanks for your answer and for have help me. I have solved adding PHP Code: $this->email->attach($upload_data['full_path']); PHP Code: $upload_data = $this->upload->data(); |