$Order_id = $object['order_id']; $Order_number = $object['order_number']; $deleivery_date = $object['deleivery_date']; $comp_id = $object['customer_company']; $order_comm = $object['order_comment']; //$current_time = date("Y-m-d h:i:s"); $current_time = $object['created_date']; $datew = new DateTime($current_time, new DateTimeZone('America/New_York')); date_default_timezone_set('America/New_York'); $temp_times = date("Y-m-d h:iA", $datew->format('U')); //$Date = date("m/d/Y", strtotime($object['created_date'])). ' ' .date("h:iA",strtotime("-180 minutes",strtotime($temp_times))); $Date = date('Y-m-d h:i A', time()); $view_orders = viewOrders($id); $pick_up = $view_orders[0]['shipping_add_id']; $mail_id = getActiveEmail(); $customer_email = array('email_id' => CompanyMail($comp_id)); array_push($mail_id, $user_mail, $customer_email); $comment = 'Comment :'; $address_3 = $shipp_address['address_3'] != '' ? $shipp_address['address_3'] . '<br>' : ''; //$mail = new PHPMailer(); ?> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type"> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px;
function CreateUsrNotiAdmin($reg_compname, $cus_contact_name, $reg_email_id) { $comp_name = getCompName($reg_compname); $mail_id = getActiveEmail(); $customer_email = array('email_id' => CompanyMail($reg_compname)); array_push($mail_id, $customer_email); $message = '<html>'; $message .= '<head>'; $message .= '<title></title>'; $message .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; $message .= '</head>'; $message .= '<body>'; $message .= '<table width="575" border="0" cellspacing="0" cellpadding="0">'; $message .= '<tr bgcolor="#ff7e00">'; $message .= '<td width="10" height="10" align="left" valign="top"></td>'; $message .= '<td height="10" align="left" valign="top"></td>'; $message .= '<td width="10" height="10" align="left" valign="top"></td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>'; $message .= '<td align="left" valign="top">'; $message .= '<table width="530" border="0" cellspacing="0" cellpadding="0">'; $message .= '<tr>'; $message .= '<td width="20" height="20" align="left" valign="top"></td>'; $message .= '<td height="20" align="left" valign="top"></td>'; $message .= '<td width="20" height="20" align="left" valign="top"></td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td width="20" align="left" valign="top"></td>'; $message .= '<td align="left" valign="top">'; $message .= '<table width="490" border="0" cellspacing="0" cellpadding="0">'; $message .= '<tr>'; $message .= '<td width="100" align="left" valign="top"><img src="http://supply.sohorepro.com/store_files/soho_logo.jpg" width="126" height="115" alt=""/></td>'; $message .= '<td width="40" align="left" valign="top"></td>'; $message .= '<td width="350" align="left" valign="top">'; $message .= '<table width="350" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">'; $message .= '<tr>'; $message .= '<td height="25" align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#ff7e00; font-weight:bold;">Dear Admin,</br></td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#444444">'; $message .= '<table>'; $message .= '<tr>'; $message .= '<td>New user has been registered by the following company:</td>'; // $message .='<td>New User has been registered:</td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td>Company Name : ' . $comp_name . '</td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td>Contact Name : ' . $cus_contact_name . '</td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td>User Mail ID : ' . $reg_email_id . '</td>'; $message .= '</tr>'; $message .= '</table>'; $message .= '</td>'; $message .= '</tr>'; $message .= '</table>'; $message .= '</td>'; $message .= '</tr>'; $message .= '</table>'; $message .= '</td>'; $message .= '</tr>'; $message .= '<tr>'; $message .= '<td height="20" align="left" valign="top"></td>'; $message .= '<td height="20" align="left" valign="top"></td>'; $message .= '<td height="20" align="left" valign="top"></td>'; $message .= '</tr>'; $message .= '</table>'; $message .= '</td>'; $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>'; $message .= '</tr>'; $message .= '<tr bgcolor="#ff7e00">'; $message .= '<td width="10" height="10" align="left" valign="top"></td>'; $message .= '<td height="10" align="left" valign="top"></td>'; $message .= '<td width="10" height="10" align="left" valign="top"></td>'; $message .= '</tr>'; $message .= '</table>'; $message .= '</body>'; $message .= '</html>'; $final_html = html_entity_decode($message); foreach ($mail_id as $mails_sent) { $pre_filt[] = $mails_sent['email_id']; } $final_list = array_unique($pre_filt); foreach ($final_list as $to) { $subject = 'New User Registered by ' . $comp_name; $headers = 'From: "SohoRepro" <*****@*****.**>' . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; //$mail_id = '*****@*****.**'; if ($comp_name != '') { $result_mail = mail($to, $subject, $final_html, $headers); } } if ($result_mail) { return '1'; } else { return '0'; } }