コード例 #1
0
         $sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address);
         if ($sent) {
             $cron_result[] = "{$to_name} ({$to_email_address}) - {$oid}";
             tep_mail(EMAIL_NAME_SERVICE, EMAIL_ADDRESS_SERVICE, $email_subject, $email_text, $from_email_name, $from_email_address);
             $sent_to = array();
             $sent_to[] = $to_email_address;
             $sent_to[] = EMAIL_ADDRESS_SERVICE;
             if ($o['type'] == 'JG') {
                 $items = $class_o->retrieveProducts($o['orders_id']);
                 foreach ($items as $i) {
                     $class_o->delayInfoSent($i['orders_products_id'], $timestamp, 'auto-sent', $sent_to);
                 }
             } elseif ($o['type'] == 'SP') {
                 $items = $class_jo->retrieveItems($o['orders_id']);
                 foreach ($items as $i) {
                     $class_jo->delayInfoSent($i['jng_sp_orders_items_id'], $timestamp, 'auto-sent', $sent_to);
                 }
             }
         }
     }
 }
 $mt_finish = microtime();
 list($old_usec, $old_sec) = explode(' ', $mt_start);
 list($new_usec, $new_sec) = explode(' ', $mt_finish);
 $old_mt = (double) $old_usec + (double) $old_sec;
 $new_mt = (double) $new_usec + (double) $new_sec;
 $runtime = $new_mt - $old_mt;
 $cron_result[] = 'Run in ' . $runtime . ' seconds';
 //save result to a log file
 $result = implode("\n", $cron_result);
 $filename = 'email.log';
コード例 #2
0
ファイル: sp-orders.php プロジェクト: blasiuscosa/manobo-2008
     $customer_id = $order['customer_billing_id'];
     $order_id = $order['order_id'];
     $order_date = date('d.m.Y', strtotime($order['order_date']));
     $product_id = $item['article_number'];
     $product_name = $item['billing_text'];
     $delay = '3-5 Tage';
     include DIR_WS_EMAILS . $languages[2]['path'] . '/sp-item-delay.php';
     $from_email_name = FROM_EMAIL_NAME;
     $from_email_address = FROM_EMAIL_ADDRESS;
     $sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address);
     if ($sent) {
         $sent_to = array();
         $sent_to[] = $to_email_address;
         $sent_to[] = EMAIL_ADDRESS_SERVICE;
         $sent_time = date('Y-m-d H:i:s');
         $class_jo->delayInfoSent($items_id, $sent_time, $session_userinfo['username'], $sent_to);
         $result = "{$items_id}: " . 'Delay Info is successfully sent.';
         $dmresult->add($result, 'green');
     } else {
         $result = "{$items_id}: " . 'Failed sending email, please try again later.';
         $dmresult->add($result);
     }
 } elseif ($order['jng_sp_id'] == '2') {
     //OTTO.DE FORMAT
     $to_name = "{$order['customer_billing_title']} {$order['customer_billing_firstname']} {$order['customer_billing_lastname']}";
     $to_email_address = $order['customer_billing_email'];
     if ($to_email_address == '') {
         $result = "{$items_id}: " . 'Customer has no email, delay info is not sent.';
         $dmresult->add($result);
     } else {
         $order_id = $order['order_id'];