本文整理汇总了PHP中mailer类的典型用法代码示例。如果您正苦于以下问题:PHP mailer类的具体用法?PHP mailer怎么用?PHP mailer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了mailer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: send_email
/** Send en bestemt artikkel på e-post */
protected function send_email($row)
{
$this->email->text('Hei,
Siden du ikke lengre er med i avisfirmaet "' . $row['ff_name'] . '" har din artikkel blitt slettet fordi den ikke tilhørte noen utgivelse. I tilfelle du kanskje ønsker å beholde teksten fra artikkelen, sender vi den på e-post.
Avisfirma: ' . $row['ff_name'] . ' <' . ess::$s['path'] . '/ff/?ff_id=' . $row['ff_id'] . '>
Tittel: ' . $row['ffna_title'] . '
Opprettet: ' . ess::$b->date->get($row['ffna_created_time'])->format(date::FORMAT_SEC) . ($row['ffna_updated_time'] ? '
Sist oppdatert: ' . ess::$b->date->get($row['ffna_updated_time'])->format(date::FORMAT_SEC) : '') . ($row['ffna_published'] ? '
Publisert: ' . ess::$b->date->get($row['ffna_published_time'])->format(date::FORMAT_SEC) : '') . '
Pris: ' . game::format_cash($row['ffna_price']) . '
Innhold:
-- START --
' . $row['ffna_text'] . '
-- SLUTT --
--
Kofradia.no
Denne e-posten er sendt til ' . $row['u_email'] . ' som ' . ($row['up_access_level'] == 0 ? 'tidligere tilhørte' : 'tilhører') . ' ' . $row['up_name'] . '
' . ess::$s['path']);
$this->email->format();
mailer::add_emails($this->email, $row['u_email'], "Din tidligere artikkel: {$row['ffna_title']} - Kofradia", true);
putlog("CREWCHAN", "AVISARTIKKEL SLETTET: E-post planlagt for utsendelse. %c4Mailer scriptet må kjøres!");
}
开发者ID:Kuzat,项目名称:kofradia,代码行数:29,代码来源:class.avis_slett_artikler.php
示例2: getInstance
public static function getInstance()
{
if (!self::$m_pInstance) {
self::$m_pInstance = new mailer();
}
return self::$m_pInstance;
}
开发者ID:Aliqhuart,项目名称:puzzlegarden,代码行数:7,代码来源:mailer.php
示例3: send
/**
* 发送邮件
*/
public function send($limit = 5)
{
$this->clear();
//根据优先级排序获取
$mails = $this->where(array('lock_expiry' => array('lt', time())))->order('priority DESC,id,err_num')->limit($limit)->select();
if (!$mails) {
return false;
}
//增加一次发送错误并且把锁定时间延长避免多个发送请求冲突
$qids = array();
foreach ($mails as $_mail) {
$qids[] = $_mail['id'];
}
$this->where(array('id' => array('in', $qids)))->save(array('err_num' => array('exp', 'err_num+1'), 'lock_expiry' => array('exp', 'lock_expiry+' . $this->_send_lock)));
//发送
$mailer = mailer::get_instance();
foreach ($mails as $_mail) {
if ($mailer->send($_mail['mail_to'], $_mail['mail_subject'], $_mail['mail_body'])) {
//删除队列
$this->delete($_mail['id']);
} else {
//失败暂不处理
}
}
}
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:28,代码来源:MailQueueModel.class.php
示例4: ajax_mail_test
public function ajax_mail_test() {
$email = $this->_get('email', 'trim');
!$email && $this->ajaxReturn(0);
//发送
$mailer = mailer::get_instance();
if ($mailer->send($email, L('send_test_email_subject'), L('send_test_email_body'))) {
$this->ajaxReturn(1);
} else {
$this->ajaxReturn(0);
}
}
开发者ID:royalwang,项目名称:saivi,代码行数:11,代码来源:settingAction.class.php
示例5: ajax_mail_test
public function ajax_mail_test()
{
$email = $this->_get('email', 'trim');
!$email && $this->ajaxReturn(0);
//发送
$mailer = mailer::get_instance();
if ($mailer->send($email, '这是一封测试邮件', '这是一封飞天侠秒杀程序自动发送的测试邮件')) {
$this->ajaxReturn(1);
} else {
$this->ajaxReturn(0);
}
}
开发者ID:xiaoliumang,项目名称:zhe800,代码行数:12,代码来源:settingAction.class.php
示例6: send
function send()
{
$Message = new mContact();
$Message->__post();
if ($Message->validate()) {
$Customer = new mCustomer();
$Customer->email = $Message->email;
if ($Customer->load()) {
$Message->customer = $Customer->id();
}
//Save and send
$Message->save();
$Email = new mailer();
$Email->sendContactForm($Message);
$Email->sendAdminContactConfirm($Message);
$this->display('sent');
} else {
data('send-error', 'The form is not complete');
$this->display('form');
}
}
开发者ID:Swift-Jr,项目名称:thmdhc,代码行数:21,代码来源:contact.php
示例7: html
function html($to, $toName, $from, $fromName, $subject, $body)
{
$mail = new mailer();
if (defined('mail_from')) {
$mail->From = mail_from;
$mail->AddReplyTo($from, $fromName);
} else {
$mail->From = $from;
}
$mail->FromName = $fromName;
$mail->IsHTML(true);
$mail->Subject = $subject;
$mail->Body = $body;
switch (gettype($to)) {
case 'string':
$mail->AddAddress($to, $toName);
break;
case 'array':
foreach ($to as $toKey => $thisTo) {
$mail->AddAddress($thisTo, $toName[$toKey]);
}
break;
default:
trigger_error('invalid type for address field');
}
if (!$mail->Send()) {
trigger_error("Message could not be sent. Mailer Error: " . $mail->ErrorInfo);
}
}
开发者ID:laiello,项目名称:zoop,代码行数:29,代码来源:Mail.php
示例8: recalcRecipients
function recalcRecipients($post)
{
$objResponse = new xajaxResponse();
if (trim($post)) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/mailer.php';
if (get_magic_quotes_runtime() || get_magic_quotes_gpc()) {
$post = stripslashes($post);
}
$post = iconv('CP1251', 'UTF-8', $post);
$_post = json_decode($post, true);
foreach ($_post as $k => $v) {
if ($v['name'] == 'attachedfiles_session') {
continue;
}
$result[$v['name']] = iconv('UTF-8', 'CP1251', $v['value']);
}
$url = http_build_query($result);
parse_str($url, $output);
$mailer = new mailer();
$filter = $mailer->loadPOST($output);
$cnt = $mailer->getCountRecipients(array('frl', 'emp'), $filter);
if ($filter['filter_emp'] > 0 && $filter['filter_frl'] > 0) {
$sum = array_sum($cnt);
} elseif ($filter['filter_emp'] > 0) {
$sum = $cnt[0];
} elseif ($filter['filter_frl'] > 0) {
$sum = $cnt[1];
} else {
$sum = array_sum($cnt);
}
$sum = $mailer->calcSumRecipientsCount($filter, $cnt);
$text = number_format($sum, 0, ',', ' ') . ' ' . ending($sum, 'человек', 'человека', 'человек');
$objResponse->assign('all_recipients_count', 'innerHTML', $text);
$objResponse->assign('emp_recipients_count', 'innerHTML', number_format($cnt[0], 0, ',', ' '));
$objResponse->assign('frl_recipients_count', 'innerHTML', number_format($cnt[1], 0, ',', ' '));
}
return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:38,代码来源:mailer.server.php
示例9: exec
public function exec($data)
{
$response_array = array();
$name = ucwords($data['name']);
$email = $data['email'];
$phone = $data['phone'] != "" ? $data['phone'] : "-";
$message = $data['message'];
// NOTIFY RECEIVER BY EMAIL
// Generate Email BODY
$html = file_get_contents(BASE_PATH . 'email_template/contact');
$html = htmlspecialchars($html);
$html = str_replace('[NAME]', $name, $html);
$html = str_replace('[EMAIL]', $email, $html);
$html = str_replace('[PHONE]', $phone, $html);
$html = str_replace('[MESSAGE]', $message, $html);
$html = html_entity_decode($html);
$body = $html;
// Send Email
$mailer = new mailer();
$mailer->IsSMTP();
// set mailer to use SMTP
$mailer->Port = EMAIL_PORT;
$mailer->Host = EMAIL_HOST;
// specify main and backup server
$mailer->SMTPAuth = true;
// turn on SMTP authentication
$mailer->Username = NOREPLY_EMAIL;
// SMTP username
$mailer->Password = NOREPLY_PASS;
// SMTP password
$mailer->From = NOREPLY_EMAIL;
$mailer->FromName = SUPPORT_NAME;
$mailer->AddReplyTo($email, $name);
$mailer->AddAddress(CONTACT_EMAIL);
$mailer->IsHTML(true);
$mailer->Subject = "NEW message from {$email} via 1STG Contact Form.";
$mailer->Body = $body;
if (!$mailer->Send()) {
$response_array['r'] = "false";
$response_array['msg'] = "Technical Error: " . $mailer->ErrorInfo;
} else {
$response_array['r'] = "true";
$response_array['msg'] = "Your message has been successfully submit.";
}
return $response_array;
}
开发者ID:kronxblue,项目名称:1stg,代码行数:46,代码来源:contact_model.php
示例10: execute
/**
* Form to email a member
*
* @author Jason Warner <[email protected]>
* @since RC1
**/
function execute()
{
$this->set_title($this->lang->email_email);
$this->tree($this->lang->email_email);
if (!$this->perms->auth('email_use')) {
return $this->message($this->lang->email_email, $this->lang->email_no_perm);
}
if (!isset($this->post['submit'])) {
$this->get['to'] = isset($this->get['to']) ? intval($this->get['to']) : '';
if ($this->get['to']) {
$target = $this->db->fetch("SELECT user_name FROM {$this->pre}users WHERE user_id={$this->get['to']}");
if (!isset($target['user_name']) || $this->get['to'] == USER_GUEST_UID) {
return $this->message($this->lang->email_email, $this->lang->email_no_member);
}
$this->get['to'] = $target['user_name'];
}
return eval($this->template('EMAIL_MAIN'));
} else {
if (empty($this->post['to']) || empty($this->post['message']) || empty($this->post['subject'])) {
return $this->message($this->lang->email_email, $this->lang->email_no_fields);
}
$target = $this->db->fetch("SELECT user_id, user_email, user_email_form FROM {$this->pre}users WHERE user_name='{$this->post['to']}'");
if (!$target['user_email_form']) {
return $this->message($this->lang->email_email, $this->lang->email_blocked);
}
if (!isset($target['user_id']) || $target['user_id'] == USER_GUEST_UID) {
return $this->message($this->lang->email_email, $this->lang->email_no_member);
}
include './lib/mailer.php';
$mailer = new mailer($this->sets['admin_incoming'], $this->sets['admin_outgoing'], $this->sets['forum_name'], false);
$mailer->setSubject("{$this->sets['forum_name']} - {$this->post['subject']}");
$mailer->setMessage("This mail has been sent by {$this->user['user_name']} via {$this->sets['forum_name']}\n\n" . stripslashes($this->post['message']));
$mailer->setRecipient($target['user_email']);
$mailer->setServer($this->sets['mailserver']);
$mailer->doSend();
return $this->message($this->lang->email_email, $this->lang->email_sent);
}
}
开发者ID:BackupTheBerlios,项目名称:mercuryb-svn,代码行数:44,代码来源:email.php
示例11: send_mail
function send_mail()
{
if (!isset($this->post['groups'])) {
$this->post['groups'] = array();
}
include '../lib/mailer.php';
$mailer = new mailer($this->sets['admin_incoming'], $this->sets['admin_outgoing'], $this->sets['forum_name'], false);
$mailer->setSubject($this->post['subject']);
$message = stripslashes($this->post['message']) . "\n";
$message .= '___________________' . "\n";
$message .= $this->sets['forum_name'] . "\n";
$message .= $this->sets['loc_of_board'] . "\n";
$mailer->setMessage($message);
$mailer->setServer($this->sets['mailserver']);
$i = 0;
$members = $this->db->query("SELECT user_email FROM {$this->pre}users" . $this->group_query($this->post['groups']));
while ($sub = $this->db->nqfetch($members)) {
$mailer->setBcc($sub['user_email']);
$i++;
}
$mailer->doSend();
return $this->message('Mass Mail', 'Your message has been sent to ' . $i . ' members.');
}
开发者ID:BackupTheBerlios,项目名称:mercuryb-svn,代码行数:23,代码来源:mass_mail.php
示例12: sendAlert
/**
*
* @access public
* @param id
*
*/
public function sendAlert($id)
{
$mail = new mailer();
$user = new users();
// send alert email !
$row = $user->getUser($id);
$emailTo = $row['user'];
$to[] = $emailTo;
$subject = "Alert: Hours spent have exceeded planned hours";
$mail->setSubject($subject);
$text = "Hello " . $emailTo . ",\n\t\t\t\t\t\t\t\t\n\t\t\tThis is a friendly reminder that you have surpassed\n\t\t\t\t\t\t\t\t\n\t\t\tthe estimated hours for this project. While we \n\t\t\t\t\t\t\t\t\t\n\t\t\tunderstand it is impossible to meet every deadline\n\t\t\t\t\t\t\t\t\t\n\t\t\twe encourage you to be as diligent as possible with\n\t\t\t\t\t\t\t\t\t\n\t\t\tyour workload.";
$mail->setText($text);
$mail->sendMail($to);
}
开发者ID:kellan04,项目名称:leantime,代码行数:20,代码来源:class.tickets.php
示例13: xos_db_query
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}
if ($_POST['action'] == 'update') {
$check_query = xos_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int) $_GET['edit'] . "' and customers_id = '" . (int) $_SESSION['customer_id'] . "' limit 1");
if (xos_db_num_rows($check_query) == 1) {
xos_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "address_book_id = '" . (int) $_GET['edit'] . "' and customers_id ='" . (int) $_SESSION['customer_id'] . "'");
if (ACCOUNT_COMPANY == 'true' && xos_not_null($company_tax_id)) {
$sql_data_array2['customers_group_ra'] = '1';
xos_db_perform(TABLE_CUSTOMERS, $sql_data_array2, 'update', "customers_id ='" . (int) $_SESSION['customer_id'] . "'");
if (SEND_EMAILS == 'true') {
// if you would *not* like to have an email when a tax id number has been entered in
// the appropriate field, comment out this section. The alert in admin is raised anyway
$alert_email_text = sprintf(EMAIL_TEXT_TAX_ID_ADDED, $firstname, $lastname, $company);
$email_to_store_owner = new mailer(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT_TAX_ID_ADDED, '', $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
if (!$email_to_store_owner->send()) {
$messageStack->add_session('header', sprintf(ERROR_PHPMAILER, $email_to_store_owner->ErrorInfo));
}
}
}
// reregister session variables
if (isset($_POST['primary']) && $_POST['primary'] == 'on' || $_GET['edit'] == $_SESSION['customer_default_address_id']) {
if (ACCOUNT_GENDER == 'true') {
$_SESSION['customer_gender'] = $gender;
}
$_SESSION['customer_first_name'] = $firstname;
$_SESSION['customer_lastname'] = $lastname;
$_SESSION['customer_country_id'] = $country;
$_SESSION['customer_zone_id'] = $zone_id > 0 ? (int) $zone_id : '0';
$_SESSION['customer_default_address_id'] = (int) $_GET['edit'];
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:address_book_process.php
示例14: mailer
<?php
require_once "classes/config.php";
require_once "classes/payed.php";
require_once "classes/pay_place.php";
require_once "classes/commune.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/wallet/walletAlpha.php';
require_once "classes/log.php";
//#0027582 аждую минуту обрабатывать запросы на размешение в карусели
pay_place::cronRequest();
// аждые пол часа обновл¤ем статус рассылок
if (date('i') == 30) {
require_once "classes/mailer.php";
$mailer = new mailer();
$mailer->updateStatusSending();
}
// ночные нестыковки во времени при переходе в следующий день #0021788
if (!in_array((int) date('Hi'), array(2358, 2359))) {
payed::UpdateProUsers();
}
//@todo: непон¤тно дл¤ чего?
//если юзер провисел 10 сек с момента публикации
//то помечаем его как просмотренный хот¤ его мог никто и неувидеть!
$pp = new pay_place();
$pp->getDoneShow(0);
$user_content = new user_content();
$user_content->releaseDelayedStreams();
$user_content->getQueueCounts();
$user_content->getStreamsQueueCounts();
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:minutly.php
示例15: before_parse
function before_parse()
{
if (empty($this->params['short'])) {
// вызвано не возле короткой формы логина, а в теле страницы
// процедура изменения пароля
if (!empty($_GET['k']) && isset($_POST['newpass']) && isset($_POST['accpass'])) {
$sql = 'sql:user?u_passre=\'' . $_GET['k'] . '\' $shrink=yes auto_query=no';
$res = $GLOBALS[CM]->run($sql);
if ($res) {
if (empty($_POST['newpass']) || $_POST['newpass'] != $_POST['accpass']) {
$this->pg = str_replace('<!--err:changepass-->', 'Пароли не совпадают', $this->pg);
return false;
// пусто или не совпадает
} else {
$GLOBALS[CM]->run($sql, 'update', array('u_passre' => '', 'u_pwd' => $_POST['newpass']));
$this->pg = $this->tpl['changed'];
return true;
// пароль изменен
}
}
}
} else {
// вызвано возле формы логина кнопкой "напомнить"
if (empty($_POST['passremail'])) {
$this->pg = str_replace('<!--err:passremail-->', '', $this->pg);
// если его не зачищать, то ява-скрипт отобразит блок, чтобы показать результат
} else {
// проверить наличие данного емыла в базе
$sql = 'sql:user?u_email=\'' . $_POST['passremail'] . '\' $shrink=yes auto_query=no';
$res = $GLOBALS[CM]->run($sql);
if (!$res) {
$this->pg = str_replace('<!--err:passremail-->', 'Пользователь с таким e-mail не найден.', $this->pg);
return false;
// емыл не найден
} elseif (!empty($res['u_lock']) && $res['u_lock'] != '') {
$this->pg = str_replace('<!--err:passremail-->', 'Пользователь заблокирован', $this->pg);
return false;
// акк заблокирован
}
// создать секретный код для беспарольного входа и отправить его на емыл юзера
if (empty($res['u_passre'])) {
$res['u_passre'] = substr(uniqid(mt_rand()), 0, 24);
$GLOBALS[CM]->run($sql, 'update', array('u_passre' => $res['u_passre']));
}
$ml = new mailer(array('tpl' => $this->params['email_tpl']));
$ml->send($res, $res['u_email']);
$this->pg = str_replace('<!--err:passremail-->', 'Письмо отправлено', $this->pg);
return true;
// пароль отправлен
}
}
$tmp = new iControl(array('pg' => $this->pg));
$tmp->get_maked();
$this->pg = $tmp->pg;
unset($tmp);
//parent::onValid();
}
开发者ID:kronius,项目名称:vidpro,代码行数:57,代码来源:auth.php
示例16: htmlspecialchars
if (validate::postDataNotEmpty()) {
$_POST['subject'] = htmlspecialchars($_POST['subject'], ENT_QUOTES, CONF_DEFAULT_CHARSET);
!validate::validateEmail($_POST['email']) ? $arrErrors[] = ERROR_EMAIL : null;
strlen($_POST['subject']) < 5 ? $arrErrors[] = ERROR_SUBJECT_SHORT : null;
strlen($_POST['message']) < 10 ? $arrErrors[] = ERROR_MESSAGE_SHORT : null;
if (SECURE_CAPTCHA) {
$securimage = new securimage();
!$securimage->check($_POST['keystring']) ? $arrErrors[] = ERROR_CAPTCHA : null;
}
} else {
$arrErrors[] = ERROR_EMPTY_FIELDS;
}
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
if (!$arrErrors) {
$mailer = new mailer();
// массив для замены в шаблоне
CONF_MAIL_FORMAT_HTML ? $message = nl2br($_POST['message']) : ($message =& $_POST['message']);
$mailer->setAddReplace(array('%FEEDBACK%' => &$message));
// проверяем, если есть дополнительный словарь тем, то используем его
$toAddress = isset($arrAddDict['FeedbackSubject']) && ($address = array_search($_POST['subject'], $arrAddDict['FeedbackSubject']['values'])) ? $address : CONF_MAIL_ADMIN_EMAIL;
// пытамеся отправить сообщение
if (!$mailer->sendEmail($_POST['email'], $_POST['email'], $_POST['email'], $toAddress, $toAddress, $_POST['subject'], 'feedback.txt')) {
$arrErrors[] = ERROR_SEND_EMAIL;
} else {
messages::messageChangeSaved(MESSAGE_WAS_SEND, false, chpu::createChpuUrl(CONF_SCRIPT_URL . 'index.php?ut=' . $_SESSION['sd_user'][DB_PREFIX . 'conf']['user_type'] . '&do=feedback'));
}
}
$return_data['subject'] = !empty($_POST['subject']) ? $_POST['subject'] : '';
$return_data['email'] = !empty($_POST['email']) ? $_POST['email'] : '';
$return_data['message'] = !empty($_POST['message']) ? $_POST['message'] : '';
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:feedback.php
示例17: Smarty
$smarty_order = new Smarty();
$smarty_order->template_dir = DIR_FS_SMARTY . 'catalog/templates/';
$smarty_order->compile_dir = DIR_FS_SMARTY . 'catalog/templates_c/';
$smarty_order->config_dir = DIR_FS_SMARTY . 'catalog/';
$smarty_order->cache_dir = DIR_FS_SMARTY . 'catalog/cache/';
$smarty_order->left_delimiter = '[@{';
$smarty_order->right_delimiter = '}@]';
if (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on') {
$smarty_order->assign('order_comments', $comments);
}
$smarty_order->assign(array('html_params' => HTML_PARAMS, 'xhtml_lang' => $languages['code'], 'charset' => CHARSET, 'store_name_address' => STORE_NAME_ADDRESS, 'store_name' => STORE_NAME, 'src_embedded_shop_logo' => 'cid:shop_logo', 'src_shop_logo' => HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . (is_file(DIR_FS_CATALOG_IMAGES . 'email_shop_logo/' . EMAIL_SHOP_LOGO) ? 'email_shop_logo/' : 'catalog/templates/' . DEFAULT_TPL . '/') . EMAIL_SHOP_LOGO, 'date_ordered' => xos_order_status_email_date_long($check_status['date_purchased']), 'order_id' => $oID, 'order_status' => $order_status['orders_status_name'], 'link_invoice' => xos_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL')));
$smarty_order->configLoad('languages/' . $check_status['language_directory'] . '_email.conf', 'order_status_email_html');
$output_order_status_email_html = $smarty_order->fetch(DEFAULT_TPL . '/includes/email/order_status_email_html.tpl');
$smarty_order->configLoad('languages/' . $check_status['language_directory'] . '_email.conf', 'order_status_email_text');
$output_order_status_email_text = $smarty_order->fetch(DEFAULT_TPL . '/includes/email/order_status_email_text.tpl');
$email_to_customer = new mailer($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $output_order_status_email_html, $output_order_status_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SHOP_LOGO);
if (!$email_to_customer->send()) {
$messageStack->add_session('header', sprintf(ERROR_PHPMAILER, $email_to_customer->ErrorInfo), 'error');
}
}
$customer_notified = '1';
}
xos_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int) $oID . "', '" . xos_db_input($status) . "', now(), '" . xos_db_input($customer_notified) . "', '" . xos_db_input($comments) . "')");
$order_updated = true;
}
if ($order_updated == true) {
$messageStack->add_session('header', SUCCESS_ORDER_UPDATED, 'success');
} else {
$messageStack->add_session('header', WARNING_ORDER_NOT_UPDATED, 'warning');
}
xos_redirect(xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('action')) . 'action=edit'));
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:orders.php
示例18: html_entity_decode
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$send_extra_order_emails_to = SEND_EXTRA_ORDER_EMAILS_TO;
$decoded_send_extra_order_emails_to = html_entity_decode($send_extra_order_emails_to, ENT_QUOTES, 'UTF-8');
$recipients = explode(',', $decoded_send_extra_order_emails_to);
for ($i = 0, $n = count($recipients); $i < $n; $i++) {
$address = '';
$name = '';
$pieces = explode('<', $recipients[$i]);
if (count($pieces) == 2) {
$address = trim($pieces[1], " >");
$name = trim($pieces[0]);
} elseif (count($pieces) == 1) {
$pos = stripos($pieces[0], '@');
$address = $pos ? trim($pieces[0], " >") : '';
}
$email_to_other_people = new mailer($name, $address, sprintf(EMAIL_TEXT_SUBJECT_OTHER, $insert_id, xos_date_format(DATE_FORMAT_SHORT)), $output_order_email_html, $output_order_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SHOP_LOGO);
if (!$email_to_other_people->send()) {
$messageStack->add_session('header', sprintf(ERROR_PHPMAILER, $email_to_other_people->ErrorInfo));
}
}
}
}
// load the after_process function from the payment modules
$payment_modules->after_process();
$_SESSION['cart']->reset(true);
// unregister session variables used during checkout
unset($_SESSION['sendto']);
unset($_SESSION['billto']);
unset($_SESSION['shipping']);
unset($_SESSION['payment']);
unset($_SESSION['comments']);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:checkout_process.php
示例19:
echo $message['eproject']['avg_answer'][0];
?>
" />
</div>
</div>
<span class="b-layout__txt"> — </span>
<div class="b-combo b-combo_inline-block">
<div class="b-combo__input b-combo__input_width_135">
<input id="c3" class="b-combo__input-text b-combo-digital-input" name="eproject_avg_answer[1]" type="text" size="80" value="<?php
echo $message['eproject']['avg_answer'][1];
?>
" />
</div>
</div>
<span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_inline-block b-layout__txt_padtop_5" <?php
echo mailer::checkEmptyRange($message, 'eproject', 'avg_answer') ? "style='display:none'" : '';
?>
>  любое количество</span>
</td>
</tr>
</table>
<table class="b-layout__table b-layout__table_width_full" cellpadding="0" cellspacing="0" border="0">
<tr class="b-layout__tr">
<td class="b-layout__left b-layout__left_width_120">
<div class="b-layout__txt b-layout__txt_lineheight_13">Расчитаны на<br />исполнителей</div>
</td>
<td class="b-layout__right">
<div class="b-check b-check_padbot_5">
<input id="eproject_executor0" class="b-check__input" name="eproject_executor[0]" type="checkbox" value="1" <?php
echo $message['eproject']['executor'][0] == 1 ? 'checked' : '';
?>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.eproject.php
示例20: addagent_exec
//.........这里部分代码省略.........
$available_pin = 40;
break;
default:
$ads_pin_limit = "unlimited";
$available_pin = 40;
break;
}
$data['ads_pin_limit'] = $ads_pin_limit;
$data['available_pin'] = $available_pin;
$data['address'] = ucwords($data['address']);
$data['mobile'] = str_replace("-", "", $data['mobile']);
$data['mobile'] = str_replace(" ", "", $data['mobile']);
$data['mobile'] = str_replace("+6", "", $data['mobile']);
$data['mobile'] = "+6" . $data['mobile'];
if (!empty($data['phone'])) {
$data['phone'] = str_replace("-", "", $data['phone']);
$data['phone'] = str_replace(" ", "", $data['phone']);
$data['phone'] = str_replace("+6", "", $data['phone']);
$data['phone'] = "+6" . $data['phone'];
}
$checkEmail = $agent->checkEmail($data['email']);
$checkCEmail = $agent->checkCdata($data['email'], $data['cemail']);
$checkUsername = $data['chkusername'];
$validUplineSponsor = FALSE;
$sponsorId = $data['sponsor_id'];
$uplineId = $data['lv1'];
if ($sponsorId != $uplineId) {
$upline_data = $this->db->select("user_accounts", "lv1,lv2,lv3,lv4,lv5,lv6,lv7,lv8,lv9,lv10", "agent_id = '{$uplineId}'", "fetch");
foreach ($upline_data as $value) {
if ($value == $sponsorId) {
$validUplineSponsor = TRUE;
}
}
} else {
$validUplineSponsor = TRUE;
}
//GENERATE ADS PIN
if ($acc_type == "aa") {
$ads_pin = "1000000";
} else {
$ads_pin = $agent->getRegPin();
}
$data['ads_pin'] = $ads_pin;
if (!$checkCEmail) {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Confirm Email</b> not match!</div>";
} elseif (!$checkEmail) {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Email</b> already exist!</div>";
} elseif ($checkUsername == 0) {
$response_array['r'] = "false";
$response_array['msg'] = "<div>Please <b>Check Username</b> availability!<div>";
} elseif ($checkUsername == '-1') {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Username</b> not available! Please choose another username.<div>";
} elseif (!$validUplineSponsor) {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Sponsor ID: {$sponsorId}</b> not related with <b>Upline ID: {$uplineId}</b>. Please make sure <b>Upline ID</b> is under correct <b>Sponsor ID</b> network.<div>";
} else {
$link = BASE_PATH . 'join/verify?a=' . $data['activate_code'] . '&s=' . $data['username'];
unset($data['cemail']);
unset($data['chkusername']);
// Insert into Database
$this->db->insert("user_accounts", $data);
// Generate Email BODY
$html = file_get_contents(BASE_PATH . 'email_template/activation');
$html = htmlspecialchars($html);
$html = str_replace('[USERNAME]', ucfirst($data['username']), $html);
$html = str_replace('[ACTIVATION_CODE]', $link, $html);
$html = html_entity_decode($html);
$body = $html;
// Send Email
$mailer = new mailer();
$mailer->IsSMTP();
// set mailer to use SMTP
$mailer->Port = EMAIL_PORT;
$mailer->Host = EMAIL_HOST;
// specify main and backup server
$mailer->SMTPAuth = true;
// turn on SMTP authentication
$mailer->Username = NOREPLY_EMAIL;
// SMTP username
$mailer->Password = NOREPLY_PASS;
// SMTP password
$mailer->From = NOREPLY_EMAIL;
$mailer->FromName = SUPPORT_NAME;
$mailer->AddAddress($data['email']);
$mailer->IsHTML(true);
$mailer->Subject = "Email verification to " . $data['email'];
$mailer->Body = $body;
if (!$mailer->Send()) {
$response_array['r'] = "false";
$response_array['msg'] = "Mailer Error: " . $mailer->ErrorInfo;
} else {
$response_array['r'] = "true";
$response_array['msg'] = BASE_PATH . "mynetwork/addagent_success/" . $data['agent_id'];
}
}
return $response_array;
}
开发者ID:kronxblue,项目名称:1stg,代码行数:101,代码来源:mynetwork_model.php
注:本文中的mailer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论