aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/admin_email.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-02-01 21:45:40 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-02-01 21:45:40 +0000
commit56391aa7b8911b14eab514c8fedddcc0f4a110b3 (patch)
tree82bd6862d6da71d1abb4f26c4a7586900b0369ab /phpBB/adm/admin_email.php
parentca729d6ac19a9aee65ed5f5e6bfd05cab11dc2a5 (diff)
downloadforums-56391aa7b8911b14eab514c8fedddcc0f4a110b3.tar
forums-56391aa7b8911b14eab514c8fedddcc0f4a110b3.tar.gz
forums-56391aa7b8911b14eab514c8fedddcc0f4a110b3.tar.bz2
forums-56391aa7b8911b14eab514c8fedddcc0f4a110b3.tar.xz
forums-56391aa7b8911b14eab514c8fedddcc0f4a110b3.zip
send mass mail immediatly
mail priority setting added log session (see Note) git-svn-id: file:///svn/phpbb/trunk@4777 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/admin_email.php')
-rw-r--r--phpBB/adm/admin_email.php34
1 files changed, 30 insertions, 4 deletions
diff --git a/phpBB/adm/admin_email.php b/phpBB/adm/admin_email.php
index 43f7225b57..9b83221d2b 100644
--- a/phpBB/adm/admin_email.php
+++ b/phpBB/adm/admin_email.php
@@ -42,6 +42,11 @@ if (isset($_POST['submit']))
$usernames = request_var('usernames', '');
$subject = preg_replace('#&(\#[0-9]+;)#', '&\1', strtr(request_var('subject', ''), array_flip(get_html_translation_table(HTML_ENTITIES))));
$message = preg_replace('#&(\#[0-9]+;)#', '&\1', strtr(request_var('message', ''), array_flip(get_html_translation_table(HTML_ENTITIES))));
+ $use_queue = (isset($_POST['send_immediatly'])) ? false : true;
+ $priority = request_var('mail_priority_flag', MAIL_NORMAL_PRIORITY);
+
+ // NOTE: Only temporary, i do not think this is a good idea for the final code, but i have to test this more than once. ;)
+ $log_session= (isset($_POST['log_session'])) ? true : false;
$error = array();
if (!$subject)
@@ -116,7 +121,7 @@ if (isset($_POST['submit']))
// Send the messages
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
- $messenger = new messenger();
+ $messenger = new messenger($use_queue);
for ($i = 0; $i < sizeof($email_list); $i++)
{
@@ -145,9 +150,10 @@ if (isset($_POST['submit']))
$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->subject($subject);
$messenger->replyto($config['board_email']);
+ $messenger->set_mail_priority($priority);
$messenger->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -155,11 +161,15 @@ if (isset($_POST['submit']))
'MESSAGE' => $message)
);
- $messenger->send($used_method);
- $messenger->queue->save();
+ $messenger->send($used_method, $log_session);
}
unset($email_list);
+ if ($messenger->queue)
+ {
+ $messenger->queue->save();
+ }
+
if ($group_id)
{
$sql = 'SELECT group_name
@@ -201,6 +211,10 @@ if ($row = $db->sql_fetchrow($result))
}
$db->sql_freeresult($result);
+$s_priority_options = '<option value="' . MAIL_LOW_PRIORITY . '">' . $user->lang['MAIL_LOW_PRIORITY'] . '</option>';
+$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
+$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
+
adm_page_header($user->lang['MASS_EMAIL']);
?>
@@ -244,6 +258,18 @@ adm_page_header($user->lang['MASS_EMAIL']);
<td class="row2"><textarea class="post" name="message" rows="10" cols="60" tabindex="3"><?php echo $message; ?></textarea></td>
</tr>
<tr>
+ <td class="row1"><b><?php echo $user->lang['MAIL_PRIORITY']; ?>: </b></td>
+ <td class="row2"><select name="mail_priority_flag"><?php echo $s_priority_options; ?></select></td>
+ </tr>
+ <tr>
+ <td class="row1"><b><?php echo $user->lang['SEND_IMMEDIATLY']; ?>: </b></td>
+ <td class="row2"><input type="checkbox" name="send_immediatly" class="text" checked="checked" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><b><?php echo $user->lang['LOG_SESSION']; ?>: </b></td>
+ <td class="row2"><input type="checkbox" name="log_session" class="text" /></td>
+ </tr>
+ <tr>
<td class="cat" colspan="2" align="center"><input type="submit" value="<?php echo $user->lang['EMAIL']; ?>" name="submit" class="btnmain" /></td>
</tr>
</table></form>