application/controllers/Tools.php
/**
     * Send email of an individual service reminder
     * 
     * @param type $to
     * @param type $unit
     * @return type
     */
Send email of an individual service reminder


Send email of an individual service reminder
protected function send_email_reminder($to, $data) {
        $CI =& get_instance();
        $CI->load->library('email');
        $config = [
            'mailtype' => 'html',
            'charset'  => 'utf-8',
            'priority' => '1'
        ];
        $this->email->initialize($config);
        $CI->email->set_header('MIME-Version', '1.0; charset=utf-8');
        $CI->email->set_header('Content-type', 'text/html');
        $header = '<html><head><title>Komatsu Maintenance Log App</title></head><body>';
        $footer = '</body></html>';
        $body = 'THIS EMAIL WAS AUTO-GENERATED.<br />PLEASE DO NOT REPLY TO THIS EMAIL.<br/ ><br />
                 =======
                 <br />
                 This is a PM Service Reminder.<br /><br />
                 UNIT: ' . $data['unit'] . '<br />
                 WARN AT: ' . $data['warn_at'] . '<br />
                 LAST SMR/MILES/TIME RECORDED: ' . $data['last_smr_recorded'] . '<br />
                 =======';
        $message = $header . $body . $footer;
        $CI->email->from('komatsumaintenancelogapp@rinconmountaintech.com', 'Komatsu NA Maintenance Log App');
        $CI->email->to($to);
        $CI->email->cc('kevin@rinconmountaintech.com');
        $CI->email->subject('** DEVELOPMENT ** PM Service Reminder for: ' . $data['unit']);
        $CI->email->message($message);
        return ($CI->email->send());
    }
protected function send_email_reminder ( $ to , $ data ) { $ CI = & get_instance ( ) ; $ CI -> load -> library ( 'email' ) ; $ config = [ 'mailtype' => 'html' , 'charset' => 'utf-8' , 'priority' => '1' ] ; $ this -> email -> initialize ( $ config ) ; $ CI -> email -> set_header ( 'MIME-Version' , '1.0; charset=utf-8' ) ; $ CI -> email -> set_header ( 'Content-type' , 'text/html' ) ; $ header = '<html><head><title>Komatsu Maintenance Log App</title></head><body>' ; $ footer = '</body></html>' ; $ body = 'THIS EMAIL WAS AUTO-GENERATED.<br />PLEASE DO NOT REPLY TO THIS EMAIL.<br/ ><br />
                 =======
                 <br />
                 This is a PM Service Reminder.<br /><br />
                 UNIT: ' . $ data [ 'unit' ] . '<br />
                 WARN AT: ' . $ data [ 'warn_at' ] . '<br />
                 LAST SMR/MILES/TIME RECORDED: ' . $ data [ 'last_smr_recorded' ] . '<br />
                 =======' ; $ message = $ header . $ body . $ footer ; $ CI -> email -> from ( 'komatsumaintenancelogapp@rinconmountaintech.com' , 'Komatsu NA Maintenance Log App' ) ; $ CI -> email -> to ( $ to ) ; $ CI -> email -> cc ( 'kevin@rinconmountaintech.com' ) ; $ CI -> email -> subject ( '** DEVELOPMENT ** PM Service Reminder for: ' . $ data [ 'unit' ] ) ; $ CI -> email -> message ( $ message ) ; return ( $ CI -> email -> send ( ) ) ; }
Send email of an individual service reminder
Send email of an individual service reminder