本文整理汇总了PHP中FormMail::sendForm方法的典型用法代码示例。如果您正苦于以下问题:PHP FormMail::sendForm方法的具体用法?PHP FormMail::sendForm怎么用?PHP FormMail::sendForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormMail
的用法示例。
在下文中一共展示了FormMail::sendForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mailSchedule
function mailSchedule(Expo $expo, Worker $worker)
{
$savList = ShiftAssignmentView::selectWorker($expo->expoid, $worker->workerid);
$paramNames = array("FIRSTNAME", "EXPONAME");
$params = array("FIRSTNAME" => $worker->firstName, "EXPONAME" => $expo->title);
$body = "Hello FIRSTNAME,\n\nYour schedule for EXPONAME is:\n";
$body .= sprintfSchedule($savList);
$body .= "\n\nSincerely,\nThe " . SITE_NAME . " Team";
$form = new FormMail($expo->title . " Schedule", $paramNames, $body);
$form->sendForm($worker->email, $params);
}
示例2: sendPasswordReset
public static function sendPasswordReset($to, $password)
{
// TODO - read subject, params, body from a properties file
$pwResetForm = new FormMail("Your " . SITE_NAME . " account", array("CODE"), "Your account password has been reset to: CODE");
$pwResetForm->sendForm($to, array('CODE' => $password));
}
示例3: logMessage
logMessage("RegistrationAction", "delete registration for worker:{$worker->workerid} failure " . $ex->getMessage());
// but ignore and continue
}
}
// $registration
$expoArray = array();
try {
$expoArray = Expo::selectMultiple();
} catch (PDOException $ex) {
logMessage("RegistrationAction", "selecting expo list " . $ex->getMessage());
// but ignore and continue
}
foreach ($expoArray as $expo) {
if ($expo->newUserAddedOnRegistration && !$expo->isPast()) {
if (!$worker->isAssignedToExpo($expo->expoid)) {
try {
$worker->assignToExpo($expo->expoid);
} catch (PDOException $ex) {
logMessage("RegistrationAction", "assign worker:{$worker->workerid} failure " . $ex->getMessage());
// but ignore and continue
}
}
}
}
//Send out a confirmation e-mail
$welcomeForm = new FormMail(SITE_NAME . " Registration Confirmation", array("FIRSTNAME", "LOGINURL"), "Hello FIRSTNAME,\nWelcome to " . SITE_NAME . "!\n\n" . "If you forget your password, simply enter your e-mail address on the login page and click the \"Reset Password\" button.\n\n" . "Login Page: LOGINURL." . "\n\nSincerely,\nThe " . SITE_NAME . " Team");
$welcomeForm->sendForm($worker->email, array("FIRSTNAME" => $worker->firstName, "LOGINURL" => LOGIN_URL));
$_SESSION[AUTHENTICATED_TEMP] = $worker;
$_SESSION[AUTHENTICATED] = $worker;
header('Location: WorkerLoginChangePage.php');
include 'WorkerLoginChangePage.php';