/** * This function is used to send wishlist * * . * * @return string */ function sendWishlist() { include_once 'classes/Core/CHome.php'; include_once 'classes/Display/DUserAccount.php'; $skin = Core_CHome::skinName(); $userid = $_SESSION['user_id']; $sqlselect = "SELECT a.product_id,image,title,msrp,date_format(date_added,'%e/%c/%Y') as adate FROM `wishlist_table` a, products_table b where a.product_id=b.product_id and a.user_id=" . $userid . " order by date_added desc"; $obj = new Bin_Query(); $obj->executeQuery($sqlselect); $content = Display_DUserAccount::getWishList($obj->records); $fileName = "css/" . $skin . "/styles.css"; $data = '<style type="text/css">' . implode('', file($fileName)) . "</style>"; $result = $data . $content; //Get User Mail Address $sqlselect = "SELECT b.email FROM `users_table` a,newsletter_subscription_table b where a.user_status=1 and a.user_id=" . $_SESSION['user_id']; $obj->executeQuery($sqlselect); $from = $obj->records[0]['email']; $to_addr = $_POST['txtEmail']; $title = $_SESSION['user'] . "Wishlsit"; $mail_content = $result; include 'classes/Lib/Mail.php'; $mail = new Lib_Mail(); $mail->From($from); $mail->ReplyTo($from); $mail->To($to_addr); $mail->Subject($title); $mail->Body($mail_content); $mail->Send(); return '<div class="alert alert-success"> <button data-dismiss="alert" class="close" type="button">×</button> ' . Core_CLanguage::_(MAIL_HAS_BEEN_SENT) . ' </div>'; }
/** * Function sends the mail to all the ids in the $to_mail array using the Lib_Mail * * * @param array $to_mail * @param string $title * @param string $mail_content * * * @return void */ function sendingMail($to_mail, $title, $mail_content) { $sql = "SELECT admin_email,set_id FROM `admin_settings_table` where set_id ='1'"; $query = new Bin_Query(); if ($query->executeQuery($sql)) { $fromemail = $query->records[0]['admin_email']; } $mail = new Lib_Mail(); $mail->From($fromemail); $mail->ReplyTo($fromemail); $mail->To($to_mail); $mail->Subject($title); $mail->Body($mail_content); $mail->Send(); }
/** * This function is used to send the user password recovery * @param string $to_mail * @param string $title * @param string $mail_content * * @return string */ function sendingMail($to_mail, $title, $mail_content) { $sql = "select set_id,admin_email from admin_settings_table where set_id='1'"; $obj = new Bin_Query(); if ($obj->executeQuery($sql)) { $from = $obj->records[0]['admin_email']; include 'classes/Lib/Mail.php'; $mail = new Lib_Mail(); $mail->From($from); $mail->ReplyTo($from); $mail->To($to_mail); $mail->Subject($title); $mail->Body($mail_content); $mail->Send(); } else { return Core_CLanguage::_(NO_MAIL_ID_PROVIDED); } }
/** * Sends a mail to the specified mail id with the use of the Lib_Mail(). * @param mixed $to_mail * @param string $title * @param string $mail_content * */ function sendingMail($to_mail, $title, $mail_content) { include 'classes/Lib/Mail.php'; $mail = new Lib_Mail(); //$mail->From($fromemail); $mail->ReplyTo('*****@*****.**'); $mail->To($to_mail); $mail->Subject($title); $mail->Body($mail_content); $mail->Send(); }
/** * This function is used to send the mail for contact us * @param string $from_mail * @param string $to_mail * @param string $mail_content * * @return string */ function sendingMail($from_mail, $to_mail, $mail_content) { include 'classes/Lib/Mail.php'; $mail = new Lib_Mail(); $mail->From($from_mail); $mail->ReplyTo('*****@*****.**'); $mail->To($to_mail); $mail->Subject('contact'); $mail->Body($mail_content); $mail->Send(); }
/** * Function is used to email the order * * * @return string */ function emailOrders() { $id = mysql_real_escape_string($_GET['id']); if (!intval($id)) { $output = "<div class='error_msgbox'>Please Select a Valid Order for Emailing</div>"; $_SESSION['errmsg'] = $output; header('Location:?do=disporders'); } $sql = 'select a.orders_id,b.user_display_name as Name,b.user_email,a.date_purchased,a.order_ship,a.billing_name,a.billing_company,a.billing_street_address,a.billing_suburb,a.billing_city,a.billing_postcode,a.billing_state,d.cou_name as billing_country,a.shipping_name,a.shipping_company,a.shipping_street_address,a.shipping_suburb,a.shipping_city,a.shipping_postcode,a.shipping_state,e.cou_name as shipping_country,c.orders_status_name,c.orders_status_id,a.order_total,f.gateway_name,g.shipment_name,a.coupon_code,h.transaction_id,a.currency_id,q.id,q.currency_tocken from orders_table a inner join users_table b on a.customers_id=b.user_id inner join orders_status_table c on c.orders_status_id=a.orders_status inner join country_table d on d.cou_code=a.billing_country inner join country_table e on e.cou_code=a.shipping_country inner join paymentgateways_table f on f.gateway_id=a.payment_method inner join payment_transactions_table h on h.order_id=a.orders_id left join shipments_master_table g on g.shipment_id=a.shipment_id_selected left join currency_master_table q on q.id=a.currency_id where a.orders_id="' . $id . '" group by a.orders_id'; $orderdetails = new Bin_Query(); $orderdetails->executeQuery($sql); $sqlOrderProduct = "select a.order_id,a.product_id,c.title,c.brand,a.product_qty,a.product_unit_price,a.product_qty*a.product_unit_price as amt,a.shipping_cost from order_products_table a,orders_table b,products_table c where a.order_id=b.orders_id and a.product_id=c.product_id and a.order_id='" . $id . "'"; $objOrderProduct = new Bin_Query(); $objOrderProduct->executeQuery($sqlOrderProduct); $mail_id_query = "select * from admin_settings_table where set_id='1'"; $getmailid = new Bin_Query(); $getmailid->executeQuery($mail_id_query); $to_mail = $getmailid->records[0]['admin_email']; $from = $getmailid->records[0]['admin_email']; $subject = 'Order Details for the Order #' . $orderdetails->records[0]['orders_id']; $mailcontent = Display_DOrderManagement::emailOrders($orderdetails->records, $objOrderProduct->records); include '../classes/Lib/Mail.php'; $mail = new Lib_Mail(); $mail->From($from); $mail->ReplyTo('*****@*****.**'); $mail->To($to_mail); $mail->Subject($subject); $mail->Body(html_entity_decode(stripslashes($mailcontent))); $mail->Send(); $output = "<div class='alert alert-success'>\n\t\t\t<button data-dismiss='alert' class='close' type='button'>×</button>\n\t\t\tOrder Details was mailed to your E-Mail address ('.{$to_mail}.'). The Mail will reach your inbox in a few minutes</div>"; $_SESSION['errmsg'] = $output; header('Location:?do=disporders'); }
/** * Function sends a mail to the mail id supplied using the Lib_Mail() * * * @param array $to_mail * @param string $title * @param string $mail_content * @return string */ function sendingMail($to_mail, $title, $mail_content) { $sql = "select set_value from admin_settings_table where set_name='Admin Email'"; $obj = new Bin_Query(); if ($obj->executeQuery($sql)) { $from = $obj->records[0]['set_value']; $mail = new Lib_Mail(); $mail->From($from); $mail->ReplyTo($from); $mail->To($to_mail); $mail->Subject($title); $mail->Body($mail_content); $mail->Send(); } else { return 'No mail id provided In Admin'; } }