本文整理汇总了PHP中messenger::cc方法的典型用法代码示例。如果您正苦于以下问题:PHP messenger::cc方法的具体用法?PHP messenger::cc怎么用?PHP messenger::cc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类messenger
的用法示例。
在下文中一共展示了messenger::cc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: messenger
$result = $db->sql_query($sql);
include_once $phpbb_root_path . 'includes/functions_messenger.' . $phpEx;
$messenger = new messenger(false);
$email_tpl = $user_id ? 'profile_send_email' : 'email_notify';
$messenger->template($email_tpl, $email_lang);
$messenger->replyto($user->data['user_email']);
$messenger->to($email, $name);
if ($user_id) {
$messenger->subject(html_entity_decode($subject));
$messenger->im($row['user_jabber'], $row['username']);
$notify_type = $row['user_notify_type'];
} else {
$notify_type = NOTIFY_EMAIL;
}
if ($cc) {
$messenger->cc($user->data['user_email'], $user->data['username']);
}
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->assign_vars(array('SITENAME' => $config['sitename'], 'BOARD_EMAIL' => $config['board_contact'], 'TO_USERNAME' => html_entity_decode($name), 'FROM_USERNAME' => html_entity_decode($user->data['username']), 'MESSAGE' => html_entity_decode($message)));
if ($topic_id) {
$messenger->assign_vars(array('TOPIC_NAME' => html_entity_decode($row['topic_title']), 'U_TOPIC' => generate_board_url() . "/viewtopic.{$phpEx}?f=" . $row['forum_id'] . "&t={$topic_id}"));
}
$messenger->send($notify_type);
$messenger->save_queue();
meta_refresh(3, append_sid("{$phpbb_root_path}index.{$phpEx}"));
$message = $user_id ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.{$phpEx}") . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", "f={$row['forum_id']}&t={$topic_id}") . '">', '</a>');
trigger_error($user->lang['EMAIL_SENT'] . '<br /><br />' . $message);
}
示例2: send_message
/**
* Send email messages to defined board security contact
*
* @param array $message_data Array of message data
* @param string $template The template file to use
* @param string $cc_user CC email address
* @return null
* @access protected
*/
protected function send_message($message_data, $template, $cc_user = '')
{
if (!class_exists('messenger')) {
include $this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext;
}
$messenger = new \messenger(false);
$messenger->template('@phpbb_teamsecurity/' . $template);
$messenger->to(!empty($this->config['sec_contact']) ? $this->config['sec_contact'] : $this->config['board_contact'], $this->config['board_contact_name']);
$messenger->cc($cc_user);
$messenger->assign_vars($message_data);
$messenger->send();
}
示例3: messenger
$result = $_CLASS['core_db']->query($sql);
// Add class loader
require_once $site_file_root . 'includes/forums/functions_messenger.php';
$email_tpl = !$topic_id ? 'profile_send_email' : 'email_notify';
$email_lang = !$topic_id ? $row['user_lang'] : $email_lang;
$email = !$topic_id ? $row['user_email'] : $email;
$messenger = new messenger();
$messenger->template($email_tpl, $email_lang);
$messenger->subject($subject);
$messenger->replyto($_CLASS['core_user']->data['user_email']);
$messenger->to($email, $row['username']);
if (!$topic_id) {
$messenger->im($row['user_jabber'], $row['username']);
}
if ($cc) {
$messenger->cc($_CLASS['core_user']->data['user_email'], $_CLASS['core_user']->data['username']);
}
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $_CLASS['core_user']->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $_CLASS['core_user']->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $_CLASS['core_user']->ip);
$messenger->assign_vars(array('SITENAME' => $_CORE_CONFIG['global']['sitename'], 'BOARD_EMAIL' => $config['board_contact'], 'FROM_USERNAME' => stripslashes($_CLASS['core_user']->data['username']), 'TO_USERNAME' => $topic_id ? stripslashes($name) : stripslashes($row['username']), 'MESSAGE' => $message, 'TOPIC_NAME' => $topic_id ? strtr($row['topic_title'], array_flip(get_html_translation_table(HTML_ENTITIES))) : '', 'U_TOPIC' => $topic_id ? generate_link('Forums&file=viewforum&f=' . $row['forum_id'] . "&t={$topic_id}", true, true, false) : ''));
$messenger->send($row['user_notify_type']);
$messenger->save_queue();
$_CLASS['core_display']->meta_refresh(3, generate_link());
$message = !$topic_id ? sprintf($_CLASS['core_user']->lang['RETURN_INDEX'], '<a href="' . generate_link() . '">', '</a>') : sprintf($_CLASS['core_user']->lang['RETURN_TOPIC'], '<a href="' . generate_link("Forums&file=viewtopic&f={$forum_id}&t=" . $row['topic_id']) . '">', '</a>');
trigger_error($_CLASS['core_user']->lang['EMAIL_SENT'] . '<br /><br />' . $message);
}
}
if ($topic_id) {
$_CLASS['core_template']->assign_array(array('EMAIL' => htmlspecialchars($email), 'NAME' => htmlspecialchars($name), 'TOPIC_TITLE' => $row['topic_title'], 'U_TOPIC' => generate_link("Forums&file=viewtopic&f={$row['forum_id']}&t={$topic_id}"), 'S_LANG_OPTIONS' => $topic_id ? language_select($email_lang) : ''));