本文整理汇总了PHP中email::logEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP email::logEmail方法的具体用法?PHP email::logEmail怎么用?PHP email::logEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::logEmail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendBookingConfirmation
function sendBookingConfirmation($bookingID, $instanceID, $enrolVar, $ccEmail = false)
{
$enrolVar['state'] = getStateFromPostcode($enrolVar['postcode']);
//$instanceID = "161835";
$courseDetailObj = getEventDetails($instanceID);
$courseDetails['name'] = $courseDetailObj['websiteName'];
$courseDetails['date'] = date("l", strtotime($courseDetailObj['courseDate'])) . "<br>" . date("j", strtotime($courseDetailObj['courseDate'])) . "<sup>" . date("S", strtotime($courseDetailObj['courseDate'])) . "</sup> " . date("F Y", strtotime($courseDetailObj['courseDate']));
$courseDetails['date_nb'] = date("l", strtotime($courseDetailObj['courseDate'])) . " " . date("j", strtotime($courseDetailObj['courseDate'])) . "<sup>" . date("S", strtotime($courseDetailObj['courseDate'])) . "</sup> " . date("F Y", strtotime($courseDetailObj['courseDate']));
$courseDetails['time'] = date("g:i a", strtotime($courseDetailObj['startDateTime'])) . " to " . date("g:i a", strtotime($courseDetailObj['endDateTime']));
$courseDetails['location'] = str_replace(", ", "<br>", str_replace("\n", "<br>", $courseDetailObj['StreetAddress']));
$courseDetails['maplink'] = "https://www.google.com.au/maps?q=" . str_replace(" ", "+", str_replace("\n", " ", $courseDetailObj['StreetAddress']));
//var_dump($courseDetails);
//die();
$emailKey = sha1(date("r", strtotime("now")) . generateRandomString(5) . $bookingID . $instanceID);
//$bookingID = "123456789-123456789";
$viewonlinelink = "https://www.australiawidefirstaid.com.au/email/?k=" . $emailKey;
$livedata = $enrolVar['fname'] . " " . $enrolVar['lname'] . "|" . $enrolVar['email'] . "|" . $bookingID;
$livechatURL = "https://www.australiawidefirstaid.com.au/?livechat=true&data=" . base64_encode($livedata);
$html = getEmailTemplate("template_CouponEmailConfirmation_generic.htm");
$html = varReplace("bookingID", $bookingID, $html);
$html = varReplace("emailviewlink", $viewonlinelink, $html);
$html = varReplace("livechatURL", $livechatURL, $html);
$html = varReplace("user.firstname", $enrolVar['fname'], $html);
$html = varReplace("user.lastname", $enrolVar['lname'], $html);
$html = varReplace("user.address", $enrolVar['address'], $html);
$html = varReplace("user.suburb", $enrolVar['suburb'], $html);
$html = varReplace("user.state", $enrolVar['state'], $html);
$html = varReplace("user.postcode", $enrolVar['postcode'], $html);
$html = varReplace("user.phone", $enrolVar['mobile'], $html);
$html = varReplace("user.email", $enrolVar['email'], $html);
$html = varReplace("user.orginisation", $enrolVar['workplace'], $html);
$html = varReplace("course.name", $courseDetails['name'], $html);
$html = varReplace("course.date", $courseDetails['date'], $html);
$html = varReplace("course.date_nb", $courseDetails['date_nb'], $html);
$html = varReplace("course.time", $courseDetails['time'], $html);
$html = varReplace("course.location", $courseDetails['location'], $html);
$html = varReplace("course.maplink", $courseDetails['maplink'], $html);
$message = $html;
$semail = "bookings@australiawidefirstaid.com.au";
$sname = "Australia Wide First Aid";
$rname = "";
$priority = "high";
$type = "text/html";
$replysemail = $semail;
$fullmessage = "";
//$remail = "accounts@australiawidefirstaid.com.au";
$remail = $enrolVar['email'];
$subject = "First Aid Course Booking Confirmation - " . $enrolVar['fname'] . " " . $enrolVar['lname'] . " - " . $enrolVar['workplace'];
email::logEmail($remail, "", $ccEmail, $subjet, $message, $bookingID, $instanceID, $emailKey);
esmtp::sendemail_smtp($remail, $subject, $message, $ccEmail);
}
示例2: sendManualInvoice
//.........这里部分代码省略.........
$html = varReplace("order.amountPaid", number_format($discountcost, 2), $html);
$html = varReplace("order.balanceDue", "0.00", $html);
} else {
$html = varReplace("order.amountPaid", "0.00", $html);
$html = varReplace("order.balanceDue", number_format($discountcost, 2), $html);
}
$html = varReplace("amountToInvoice", number_format($discountcost, 2), $html);
$html = varReplace("eventID", $mData['eventID'], $html);
$html = varReplace("courseName", $mData['CourseName'], $html);
$html = varReplace("courseDateTime", $mData['startDateTime'], $html);
$html = varReplace("courseLocation", $mData['LocationState'] . " " . $mData['LocationName'] . " - " . $mData['StreetAddress'], $html);
$html = varReplace("totalTrainees", $mData['total_trainee'], $html);
$html = varReplace("courseNormalCost", "\$" . number_format($costNormalTotal, 2), $html);
$html = varReplace("couponCode", $mData['campaign_code'], $html);
$html = varReplace("couponName", $couponName, $html);
if ($mData['discountType'] == "0") {
$html = varReplace("couponDiscount", "\$" . $mData['discountAmount'] . " off total", $html);
}
if ($mData['discountType'] == "1") {
$html = varReplace("couponDiscount", $mData['discountAmount'] . "% off total", $html);
}
if ($mData['discountType'] == "2") {
$html = varReplace("couponDiscount", "Custom price for Location", $html);
}
if ($mData['discountType'] == "3") {
$html = varReplace("couponDiscount", "Custom price for Course", $html);
}
$trainees = db::runQuery("select * from process_trainee where processgroupID = '{$processgroupID}'");
if (!$trainees) {
return false;
} else {
$currentTrainee = 1;
$traineehtml = "";
foreach ($trainees as $trainee) {
$trhtml = "";
$trhtml = $trhtml . '<b>Trainee ' . $currentTrainee . '</b>';
$trhtml = $trhtml . ' <table style="width:100%; margin-left:70px;">';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Contact ID</th>';
$trhtml = $trhtml . ' <td style="text-align:left;"><a href="https://admin.axcelerate.com.au/management/management2/Contact_View.cfm?ContactID=' . $trainee['contactID'] . '">' . $trainee['contactID'] . '</a></th>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Learner ID</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['leanerID'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Invoice ID</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['invoiceID'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Amount to Invoice</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">$' . number_format($trainee['cost'], 2) . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;"> </th>';
$trhtml = $trhtml . ' <td style="text-align:left;"></td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Name</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['firstname'] . ' ' . $trainee['lastname'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">USI</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['usi'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Email Address</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['email'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Mobile/Phone</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['mobile'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Workplace</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['workplace'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' <tr style="font-size:13px;">';
$trhtml = $trhtml . ' <th width="30%" style="text-align:left;">Address</th>';
$trhtml = $trhtml . ' <td style="text-align:left;">' . $trainee['address'] . '<br>' . $trainee['suburb'] . ' ' . $trainee['postcode'] . '</td>';
$trhtml = $trhtml . ' </tr>';
$trhtml = $trhtml . ' </table><br><br>';
$traineehtml = $traineehtml . $trhtml;
$currentTrainee++;
}
$html = varReplace("traineeDetails", $traineehtml, $html);
$remail = $mData['awfaSendInvoiceNotification'];
//$remail = "andrew@vbz.com.au";
$subject = "MANUAL INVOICE: Please generate a manual invoice for this Discounted Enrolment";
$message = $html;
$bookingID = "";
$instanceID = "";
$ccEmail = "";
//$ccEmail = "accounts@australiawidefirstaid.com.au";
email::logEmail($remail, $ccEmail, "", $subject, $message, $bookingID, $instanceID, $emailKey);
esmtp::sendemail_smtp($remail, $subject, $message, $ccEmail);
echo $html;
}
}
}