Codeigniter Email Pdf Attachment

Posted on by
Ipad Email Pdf Attachment

CodeIgniter Email Library Attachments. What I try I cannot get this attachment loaded on to an email to. // send feedback PDF.

Log_message('debug', 'screening is not blank'); // Get custom email content $this->_ci->load->model('contents_model'); //$this->_ci->contents_model->initialize(); $this->_ci->contents_model->slug = 'screening-certificate-email'; $user_data['custom_content'] = $this->_ci->contents_model->load(true); // send feedback PDF $file_path = CERTIFICATE_FILE_PATH. '.pdf'; $this->_ci->load->library('email'); $this->_ci->email->from('xxxxxxxxxxx'); $this->_ci->email->to($email); $this->_ci->email->subject('Your Requested Certificate from '. SITE_NAME); $this->_ci->email->message($this->_ci->load->view('public/email/certificate', $user_data, TRUE)); log_message('debug', $_SERVER['DOCUMENT_ROOT']); $this->_ci->email->attach($file_path); log_message('debug', $this->_ci->email->print_debugger()); log_message('debug', $file_path); The file_path equates to /var/downloads/certificates/xxxx.pdf Any thoughts or help would be much appreciated thank you! Log_message('debug', 'screening is not blank'); // Get custom email content $this->_ci->load->model('contents_model'); //$this->_ci->contents_model->initialize(); $this->_ci->contents_model->slug = 'screening-certificate-email'; $user_data['custom_content'] = $this->_ci->contents_model->load(true); // send feedback PDF $file_path = CERTIFICATE_FILE_PATH. '.pdf'; $this->_ci->load->library('email'); $this->_ci->email->from('xxxxxxxxxxx'); $this->_ci->email->to($email); $this->_ci->email->subject('Your Requested Certificate from '.

SITE_NAME); $this->_ci->email->message($this->_ci->load->view('public/email/certificate', $user_data, TRUE)); log_message('debug', $_SERVER['DOCUMENT_ROOT']); $this->_ci->email->attach($file_path); log_message('debug', $this->_ci->email->print_debugger()); log_message('debug', $file_path); The file_path equates to /var/downloads/certificates/xxxx. Storia Della Letteratura Inglese Pdf Converter there. pdf Any thoughts or help would be much appreciated thank you! I believe the output of print_debugger is an array, and cannot be sent to log unless converted to string, so you might try to json_encode it. Log_message('debug', 'screening is not blank'); // Get custom email content $this->_ci->load->model('contents_model'); //$this->_ci->contents_model->initialize(); $this->_ci->contents_model->slug = 'screening-certificate-email'; $user_data['custom_content'] = $this->_ci->contents_model->load(true); // send feedback PDF $file_path = CERTIFICATE_FILE_PATH. '.pdf'; $this->_ci->load->library('email'); $this->_ci->email->from('xxxxxxxxxxx'); $this->_ci->email->to($email); $this->_ci->email->subject('Your Requested Certificate from '. SITE_NAME); $this->_ci->email->message($this->_ci->load->view('public/email/certificate', $user_data, TRUE)); log_message('debug', $_SERVER['DOCUMENT_ROOT']); $this->_ci->email->attach($file_path); log_message('debug', $this->_ci->email->print_debugger()); log_message('debug', $file_path); The file_path equates to /var/downloads/certificates/xxxx.pdf Any thoughts or help would be much appreciated thank you!

Comments are closed.