function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); }
function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); }
function sendmail($message, $output, $reportname) { $this->load->helper('file'); // $email_address = '*****@*****.**'; // $message = 'Hi William'; // $subject = 'no subject today'; include 'auto_sms.php'; // $output = 'This is the output that should be stated on the pdf'; $newmail = new auto_sms(); $this->load->library('mpdf'); $mpdf = new mPDF(); $mpdf->WriteHTML($output); $emailAttachment = $mpdf->Output($reportname . '.pdf', 'S'); // $emailAttachment = chunk_split(base64_encode($emailAttachment)); // echo $emailAttachment; $attach_file = './pdf/' . $reportname . '.pdf'; if (!write_file('./pdf/' . $reportname . '.pdf', $mpdf->Output('report_name.pdf', 'S'))) { $this->session->set_flashdata('system_error_message', 'An error occured'); } else { // $email_address = "*****@*****.**"; $email_address = " williamnguru@gmail.com"; $subject = 'Order Report For ' . $reportname; $attach_file = './pdf/' . $reportname . '.pdf'; // $bcc_email = 'williamnguru@gmail.com,kariukijackson@gmail.com,tngugi@gmail.com,rickinyua@gmail.com'; $response = $newmail->send_email($email_address, $message, $subject, $attach_file, $bcc_email); // $response= $newmail->send_email(substr($email_address,0,-1),$message,$subject,$attach_file,$bcc_email); if ($response) { delete_files('./pdf/' . $reportname . '.pdf'); } } }
function __construct() { parent::__construct(); $this->load->helper(array('form', 'url', 'file')); $this->load->library('mpdf'); }
function __construct() { parent::__construct(); $this->load->helper('url'); }