當前位置: 首頁>>代碼示例>>PHP>>正文


PHP util::sendEmail方法代碼示例

本文整理匯總了PHP中util::sendEmail方法的典型用法代碼示例。如果您正苦於以下問題:PHP util::sendEmail方法的具體用法?PHP util::sendEmail怎麽用?PHP util::sendEmail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在util的用法示例。


在下文中一共展示了util::sendEmail方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: userData

require_once "header.php";
require_once "class.util.php";
require_once "class.userData.php";
require_once "class.validation.php";
require_once "class.database.php";
$message = "";
if (isset($_GET['sendmail']) && $_GET['sendmail'] == 1) {
    $matricule = $_POST['matricule'];
    if (isset($matricule) && validation::matricule($matricule)) {
        $user = new userData($_POST['matricule']);
        if ($user->getExist()) {
            $password = util::generatePassword();
            $pregArray = array(array('key' => "/@@FIRSTNAME@@/", 'value' => $user->getFirstName()), array('key' => "/@@LASTNAME@@/", 'value' => $user->getLastName()), array('key' => "/@@PASSWORD@@/", 'value' => $password));
            $database = database::instance();
            $database->requete("UPDATE st_authentication SET password='" . md5($password) . "' WHERE matricule='" . $matricule . "'");
            util::sendEmail($user->getEmail(), 'accessrecovery.txt', $pregArray, "Stationnement AEP - Demande de nouveau mot de passe");
            $message = util::UTF8toISO8859("Un courriel avec votre nouveau mot de passe vous a été envoyé");
        } else {
            $message = 'Utilisateur non existant';
        }
    } else {
        $message = 'Matricule invalide';
    }
}
?>
<div>
	<?php 
if ($message != "") {
    echo $message . '</br></br>';
}
?>
開發者ID:Gwagz,項目名稱:stationnement_aep,代碼行數:31,代碼來源:accessrecovery.php

示例2: changeStatusTo

 public function changeStatusTo($newStatusId, $details = "", $sendMail = true, $includeDetailsInMail = false)
 {
     $database = database::instance();
     //$clearStatusQueryString = $clearDetails ? demande::STATUS_DETAILS_DB_FIELD." = '".$newStatusId."', " : "";
     $database->requete("UPDATE st_demande SET " . demande::STATUS_DETAILS_DB_FIELD . " = '" . mysql_real_escape_string($details) . "'," . demande::STATUS_DB_FIELD . " = '" . $newStatusId . "' \n                            WHERE " . demande::MATRICULE_DB_FIELD . " = '" . $this->matricule . "'");
     $this->statusId = $newStatusId;
     if (!$sendMail) {
         return true;
     }
     if (!$includeDetailsInMail) {
         $details = "";
     }
     $this->loadStatusData($this->matricule);
     $user = new userData($this->matricule);
     if ($user->getUserData($this->matricule)) {
         $preg = array(array('key' => '/@@FIRSTNAME@@/', 'value' => $user->getFirstName()), array('key' => '/@@LASTNAME@@/', 'value' => $user->getLastName()), array('key' => '/@@STATUS@@/', 'value' => $this->getName()), array('key' => '/@@DETAILS@@/', 'value' => $details));
         return util::sendEmail($user->getEmail(), 'email_status.txt', $preg, "Changement de status de votre demande");
     }
 }
開發者ID:Gwagz,項目名稱:stationnement_aep,代碼行數:19,代碼來源:class.demandStatus.php

示例3: sendemail

 function sendemail($regID, $rType, $refID, $tID, $method)
 {
     $this->load->model('register/user_m', 'user_m');
     $data = $this->user_m->get_user_profile($tID);
     $mailFrom = 'ha.noreply@ha.co.th';
     $mailTo = $data[0]['email'];
     if ($method == "del") {
         $subject = 'ยกเลิกการสำรองที่นั่ง';
     } else {
         $subject = 'ได้รับยืนยันการสำรองที่นั่งแล้ว';
     }
     $content = $this->getemailcontent($regID, $refID, $rType, $method);
     //echo $content;
     //exit;
     util::sendEmail($mailFrom, array($mailTo), $subject, $content, 'html');
 }
開發者ID:Nirun,項目名稱:HAsong01ha,代碼行數:16,代碼來源:payment.php

示例4: getRemindEmail

 function getRemindEmail()
 {
     $this->load->model('register/user_m', 'user_m');
     $res = $this->user_m->getRemindWaiting();
     $rec = 0;
     if (count($res) > 0) {
         foreach ($res as $data) {
             $mailFrom = 'nirun.noreply@gmail.com';
             $mailTo = $data['email'];
             $subject = 'ยืนยันการชำระเงิน เหลือเวลาอีก 3 วัน';
             $content = $this->getBillingOnly($data['registrationID']);
             util::sendEmail($mailFrom, array($mailTo), $subject, $content, 'html');
             //echo $content;
             $rec++;
             echo $rec . '. > regID >' . $data['registrationID'] . ' email > ' . $mailTo . '<br>';
         }
     }
 }
開發者ID:Nirun,項目名稱:HAsong01ha,代碼行數:18,代碼來源:user.php

示例5: register_paid

 function register_paid()
 {
     $this->load->model('register/user_m', 'user_m');
     $res = json_decode($this->input->post('register'), true);
     $this->user_m->context['payment_type'] = 1;
     // transfer
     $this->user_m->context['courseID'] = $this->input->post('courseID');
     $this->user_m->context['desc'] = '';
     $this->user_m->context['cheq'] = '';
     $this->user_m->context['bank_name'] = '';
     $this->user_m->context['register'] = $res;
     $traineeID = $res['traineeID'];
     $data = $this->user_m->get_user_profile($traineeID);
     $regisID = 0;
     if (isset($res['registerID'])) {
         $ret = $this->user_m->addPaymentUpdateRegister();
         $regisID = trim($res['registerID']);
     } else {
         $ret = $this->user_m->addPaymentWithRegister();
         if ($ret != false) {
             $regisID = $ret;
         }
     }
     if ($regisID != 0) {
         // add Receipt info
         if ($this->input->post('receipt_type') == 'self') {
             $user_name = $this->input->post('user_name');
             $user_address = $this->input->post('user_address');
         } else {
             $user_name = $this->input->post('other_name');
             $user_address = $this->input->post('other_address');
         }
         $this->user_m->addReceiptInfo($regisID, $user_name, $user_address);
         // email
         $mailFrom = 'nirun.noreply@gmail.com';
         $mailTo = $data[0]['email'];
         $subject = 'ยืนยันการชำระเงิน';
         $content = $this->getBilling($regisID);
         //echo $content; exit;
         util::sendEmail($mailFrom, array($mailTo), $subject, $content, 'html');
     }
     redirect(setting::$BASE_URL . '/member/main/');
     exit;
 }
開發者ID:Nirun,項目名稱:HAsong01ha,代碼行數:44,代碼來源:_user.php

示例6: VALUES

 // Postal check
 if (empty($postalCode) || !validation::codePostal($postalCode)) {
     $errMessagesArray["postalCode"] = "Vous devez fournir un code postal valide";
     $isSubmissionValid = false;
 }
 if ($isSubmissionValid) {
     // Put user in database
     try {
         $database->beginTransaction();
         if ($postType == 'register') {
             $database->requete("INSERT INTO st_authentication \n\t                                (matricule, password) \n\t                                        VALUES ('" . $matricule . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . md5($password) . "')");
             $database->requete("INSERT INTO st_user_metadata \n\t\t\t\t\t\t\t\t\t(matricule,lastname,firstname,address,city,zipcode,tel_1,email)\n\t\t\t\t\t\t\t\t\tVALUES \n\t\t\t\t\t\t\t\t\t('" . $matricule . "',\n\t\t\t\t\t\t\t\t\t'" . $lastName . "',\n\t\t\t\t\t\t\t\t\t'" . $firstName . "',\n\t\t\t\t\t\t\t\t\t'" . $address . "',\n\t\t\t\t\t\t\t\t\t'" . $city . "',\n\t\t\t\t\t\t\t\t\t'" . $postalCode . "',\n\t\t\t\t\t\t\t\t\t'" . $phone . "',\n\t\t\t\t\t\t\t\t\t'" . $email . "')");
             $database->commitTransaction();
             if (config::SendEmail) {
                 $pregArray = array(array('key' => "/@@LASTNAME@@/", 'value' => $lastName), array('key' => "/@@FIRSTNAME@@/", 'value' => $firstName));
                 util::sendEmail($email, 'email.txt', $pregArray, "Stationnement AEP - Creation de compte");
             }
             // Automatic log in
             $objAuth = authentification::instance();
             $objAuth->verification($matricule, $password);
             header("Location: demande.php");
             exit;
         } else {
             $database->requete("UPDATE st_user_metadata \n\t                \t\t\t\tSET \n\t                \t\t\t\tlastname='" . $lastName . "',\n\t                \t\t\t\tfirstname='" . $firstName . "',\n\t                \t\t\t\taddress='" . $address . "',\n\t                \t\t\t\tcity='" . $city . "',\n\t                \t\t\t\tzipcode='" . $postalCode . "',\n\t                \t\t\t\ttel_1='" . $phone . "',\n\t                \t\t\t\temail='" . $email . "' \n\t                \t\t\t\tWHERE matricule='" . $matricule . "'");
             updateTripInfo($address, $city, $postalCode, $matricule);
             $database->commitTransaction();
         }
     } catch (Exception $e) {
         $database->abortTransaction();
     }
 }
開發者ID:Gwagz,項目名稱:stationnement_aep,代碼行數:31,代碼來源:register.php

示例7: remind

 function remind()
 {
     header('Content-type: text/html; charset=utf-8');
     $this->load->model('register/mail_m', 'mail_m');
     $res = $this->mail_m->getListRemind();
     foreach ($res as $val) {
         $fullname = $val['name'] . ' ' . $val['lastname'];
         $dateregist = Thaidate::date($val['registerdatetime'], 'DD MM YYYY');
         $dateregistend = Thaidate::date(date('Y-m-d H:i:s'), 'DD MM YYYY');
         $course = $val['coursename'] . '(' . $val['coursecode'] . ')';
         $coursedate = Thaidate::date($val['startdate'], 'DD MM YYYY') . ' - ' . Thaidate::date($val['enddate'], 'DD MM YYYY');
         $courseplace = $val['place'];
         if ($val['refType'] == '0') {
             $total = 1;
             $list = '';
         } else {
             $dataRepresentative = util::getRepresentiveList($val['registrationID']);
             $total = count($dataRepresentative);
             $listName = array();
             foreach ($dataRepresentative as $keyP => $valP) {
                 $listName[] = ' ' . $valP['name'] . ' ' . $valP['lastname'];
             }
             $list = implode(',', $listName);
         }
         // email
         $mailFrom = 'nirun.noreply@gmail.com';
         $mailTo = $val['email'];
         $subject = 'แจ้งเตือนการชำระเงิน';
         $content = $this->remindContent($fullname, $dateregist, $dateregistend, $course, $coursedate, $courseplace, $total, $list);
         //echo $content;
         util::sendEmail($mailFrom, array($mailTo), $subject, $content, 'html');
     }
     exit;
 }
開發者ID:Nirun,項目名稱:HAsong01ha,代碼行數:34,代碼來源:mail.php

示例8: requestForgotPasswordEmail

 public static function requestForgotPasswordEmail($pack)
 {
     if ($pack->user_name) {
         $user = dbconnection::queryObject("SELECT * FROM users WHERE user_name = '{$pack->user_name}' LIMIT 1");
     } else {
         if ($pack->email) {
             $user = dbconnection::queryObject("SELECT * FROM users WHERE email = '{$pack->email}' LIMIT 1");
         }
     }
     if (!$user) {
         return new return_package(0);
     }
     $userId = $user->user_id;
     $username = $user->user_name;
     $email = $user->email;
     $junk = users::breakPassword($userId);
     //email it to them
     $subject = "ARIS Password Request";
     $body = "We received a forgotten password request for your ARIS account.\n        If you did not make this request, do nothing and your account info will not change.\n        <br><br>To reset your password, simply click the link below.\n        Please remember that passwords are case sensitive.\n        If you are not able to click on the link, please copy and paste it into your web browser.\n        <br><br>\n        <a href='" . Config::serverWWWPath . "/services/v2/resetpassword.html?i={$userId}&j={$junk}'>" . Config::serverWWWPath . "/services/v2/resetpassword.html?i={$userId}&j={$junk}</a>\n        <br><br> Regards, <br>ARIS";
     util::sendEmail($email, $subject, $body);
     return new return_package(0);
 }
開發者ID:kimblemj,項目名稱:server,代碼行數:22,代碼來源:users.php

示例9: confirm_queue

 function confirm_queue()
 {
     $ret = true;
     header('Content-type: text/html; charset=utf-8');
     $this->load->model('register/user_m', 'user_m');
     $regisID = $this->uri->segment(4);
     $res = $this->user_m->getBillingInfo($regisID);
     $content = $this->getBilling($regisID);
     $content_confirm = $this->getConfirmQueue($regisID);
     try {
         $mailFrom = 'nirun.noreply@gmail.com';
         $mailTo = $res[0]['email'];
         $subject = 'ยืนยันการชำระเงิน';
         $subject_confirm = 'ได้รับยืนยันการสำรองที่นั่งแล้ว';
         util::sendEmail($mailFrom, array($mailTo), $subject, $content, 'html');
         util::sendEmail($mailFrom, array($mailTo), $subject_confirm, $content_confirm, 'html');
     } catch (Exception $e) {
         $ret = false;
     }
     return $ret;
 }
開發者ID:Nirun,項目名稱:HAsong01ha,代碼行數:21,代碼來源:user.php


注:本文中的util::sendEmail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。