本文整理汇总了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>';
}
?>
示例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");
}
}
示例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');
}
示例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>';
}
}
}
示例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;
}
示例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();
}
}
示例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;
}
示例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);
}
示例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;
}