当前位置: 首页>>代码示例>>PHP>>正文


PHP Mailer::use_template方法代码示例

本文整理汇总了PHP中Mailer::use_template方法的典型用法代码示例。如果您正苦于以下问题:PHP Mailer::use_template方法的具体用法?PHP Mailer::use_template怎么用?PHP Mailer::use_template使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mailer的用法示例。


在下文中一共展示了Mailer::use_template方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

             if ($nl_config['use_smtp']) {
                 $mailer->smtp_path = WAMAILER_DIR . '/';
                 $mailer->use_smtp($nl_config['smtp_host'], $nl_config['smtp_port'], $nl_config['smtp_user'], $nl_config['smtp_pass']);
             }
             $mailer->set_charset($lang['CHARSET']);
             $mailer->set_format(FORMAT_TEXTE);
             if ($abodata['pseudo'] != '') {
                 $address = array($abodata['pseudo'] => $abodata['email']);
             } else {
                 $address = $abodata['email'];
             }
             $mailer->set_from($listdata['sender_email'], unhtmlspecialchars($listdata['liste_name']));
             $mailer->set_address($address);
             $mailer->set_subject($lang['Subject_email']['Sendkey']);
             $mailer->set_return_path($listdata['return_email']);
             $mailer->use_template('account_info', array('EMAIL' => $abodata['email'], 'CODE' => $abodata['regkey'], 'URLSITE' => $nl_config['urlsite'], 'SIG' => $listdata['liste_sig']));
             if (!$mailer->send()) {
                 trigger_error('Failed_sending', ERROR);
             }
             $output->message('IDs_sended');
         } else {
             $error = TRUE;
             $msg_error[] = $lang['Message']['Unknown_email'];
         }
     }
     $output->page_header();
     $output->set_filenames(array('body' => 'sendkey_body.tpl'));
     $output->assign_vars(array('TITLE' => $lang['Title']['sendkey'], 'L_EXPLAIN' => nl2br($lang['Explain']['sendkey']), 'L_LOGIN' => $lang['Account_login'], 'L_VALID_BUTTON' => $lang['Button']['valid']));
     $output->pparse('body');
     break;
 case 'editprofile':
开发者ID:bibwho,项目名称:MATPbootstrap,代码行数:31,代码来源:profil_cp.php

示例2: Mailer

            $msg_error[] = $lang['Message']['Error_sendpass'];
        }
        if (!$error) {
            $new_password = generate_key(12);
            require WAMAILER_DIR . '/class.mailer.php';
            $mailer = new Mailer(WA_ROOTDIR . '/language/email_' . $nl_config['language'] . '/');
            if ($nl_config['use_smtp']) {
                $mailer->smtp_path = WAMAILER_DIR . '/';
                $mailer->use_smtp($nl_config['smtp_host'], $nl_config['smtp_port'], $nl_config['smtp_user'], $nl_config['smtp_pass']);
            }
            $mailer->set_charset($lang['CHARSET']);
            $mailer->set_format(FORMAT_TEXTE);
            $mailer->set_from($email);
            $mailer->set_address($email);
            $mailer->set_subject($lang['Subject_email']['New_pass']);
            $mailer->use_template('new_admin_pass', array('PSEUDO' => $login, 'PASSWORD' => $new_password));
            if (!$mailer->send()) {
                trigger_error('Failed_sending', ERROR);
            }
            $db->query("UPDATE " . ADMIN_TABLE . "\n\t\t\t\tSET admin_pwd = '" . md5($new_password) . "'\n\t\t\t\tWHERE admin_id = " . $admin_id);
            $output->message('IDs_sended');
        }
    }
    $output->page_header();
    $output->set_filenames(array('body' => 'sendpass_body.tpl'));
    $output->assign_vars(array('TITLE' => $lang['Title']['sendpass'], 'L_LOGIN' => $lang['Login'], 'L_EMAIL' => $lang['Email_address'], 'L_VALID_BUTTON' => $lang['Button']['valid'], 'S_LOGIN' => htmlspecialchars($login), 'S_EMAIL' => htmlspecialchars($email)));
    $output->pparse('body');
    $output->page_footer();
} else {
    if ($mode == 'login' && !$session->is_logged_in) {
        $login = !empty($_POST['login']) ? trim($_POST['login']) : '';
开发者ID:bibwho,项目名称:MATPbootstrap,代码行数:31,代码来源:login.php

示例3: Mailer

            $sql = "SELECT admin_login\n\t\t\t\tFROM " . ADMIN_TABLE . "\n\t\t\t\tWHERE admin_id = " . $admin_id;
            if (!($result = $db->query($sql))) {
                trigger_error('Impossible de récupérer le pseudo de cet utilisateur', ERROR);
            }
            $pseudo = $result->column('admin_login');
            $mailer = new Mailer(WA_ROOTDIR . '/language/email_' . $nl_config['language'] . '/');
            if ($nl_config['use_smtp']) {
                $mailer->smtp_path = WAMAILER_DIR . '/';
                $mailer->use_smtp($nl_config['smtp_host'], $nl_config['smtp_port'], $nl_config['smtp_user'], $nl_config['smtp_pass']);
            }
            $mailer->set_charset($lang['CHARSET']);
            $mailer->set_format(FORMAT_TEXTE);
            $mailer->set_from($admindata['admin_email'], $admindata['admin_login']);
            $mailer->set_address($email);
            $mailer->set_subject($lang['Subject_email']['New_pass']);
            $mailer->use_template('new_admin_pass', array('PSEUDO' => $pseudo, 'PASSWORD' => $new_pass));
            if (!$mailer->send()) {
                trigger_error(sprintf($lang['Message']['Failed_sending2'], $mailer->msg_error), ERROR);
            }
        }
        $output->redirect('./admin.php', 6);
        $message = $lang['Message']['Profile_updated'];
        $message .= '<br /><br />' . sprintf($lang['Click_return_profile'], '<a href="' . sessid('./admin.php?admin_id=' . $admin_id) . '">', '</a>');
        $message .= '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . sessid('./index.php') . '">', '</a>');
        $output->message($message);
    }
}
$admin_box = '';
if ($admindata['admin_level'] == ADMIN) {
    $current_admin = NULL;
    if (!empty($admin_id) && $admin_id != $admindata['admin_id']) {
开发者ID:bibwho,项目名称:MATPbootstrap,代码行数:31,代码来源:admin.php


注:本文中的Mailer::use_template方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。