- telling the admin for what the board contact and board email addresses are used for and also making sure this explanation is correct ;)

- fixes for bugs #6694, #6664 and #6662


git-svn-id: file:///svn/phpbb/trunk@6826 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-12-31 16:56:15 +00:00
parent 54f79e200f
commit 46f3bd40a8
22 changed files with 16 additions and 36 deletions

View file

@ -156,7 +156,6 @@ class acp_email
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->subject(htmlspecialchars_decode($subject)); $messenger->subject(htmlspecialchars_decode($subject));
$messenger->replyto($config['board_email']);
$messenger->set_mail_priority($priority); $messenger->set_mail_priority($priority);
$messenger->assign_vars(array( $messenger->assign_vars(array(

View file

@ -102,7 +102,6 @@ class acp_inactive
{ {
$messenger->template('user_remind_inactive', $row['user_lang']); $messenger->template('user_remind_inactive', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -296,7 +296,6 @@ class acp_users
$messenger->template('user_resend_inactive', $user_row['user_lang']); $messenger->template('user_resend_inactive', $user_row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($user_row['user_email'], $user_row['username']); $messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);

View file

@ -363,12 +363,12 @@ class messenger
if (empty($this->replyto)) if (empty($this->replyto))
{ {
$this->replyto = '<' . $config['board_email'] . '>'; $this->replyto = '<' . $config['board_contact'] . '>';
} }
if (empty($this->from)) if (empty($this->from))
{ {
$this->from = '<' . $config['board_email'] . '>'; $this->from = '<' . $config['board_conact'] . '>';
} }
// Build to, cc and bcc strings // Build to, cc and bcc strings
@ -474,7 +474,7 @@ class messenger
foreach ($addresses as $address) foreach ($addresses as $address)
{ {
$this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg)); $this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg, 'subject' => $this->subject));
} }
sleep(1); sleep(1);
@ -637,7 +637,7 @@ class queue
case 'jabber': case 'jabber':
foreach ($addresses as $address) foreach ($addresses as $address)
{ {
if ($this->jabber->send_message($address, 'normal', NULL, array('body' => $msg)) === false) if ($this->jabber->send_message($address, 'normal', NULL, array('body' => $msg, 'subject' => $subject)) === false)
{ {
messenger::error('JABBER', $this->jabber->get_log()); messenger::error('JABBER', $this->jabber->get_log());
continue 3; continue 3;
@ -781,10 +781,10 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
// Something we really didn't take into consideration originally // Something we really didn't take into consideration originally
$header_array = explode("\r\n", $headers); $header_array = explode("\r\n", $headers);
$headers = ''; $headers = '';
foreach ($header_array as $header) foreach ($header_array as $header)
{ {
if (preg_match('#^cc:#si', $header) || preg_match('#^bcc:#si', $header)) if (strpos(strtolower($header), 'cc:') === 0 || strpos(strtolower($header), 'bcc:') === 0)
{ {
$header = ''; $header = '';
} }
@ -865,7 +865,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
// From this point onward most server response codes should be 250 // From this point onward most server response codes should be 250
// Specify who the mail is from.... // Specify who the mail is from....
$smtp->server_send('MAIL FROM:<' . $config['board_email'] . '>'); $smtp->server_send('MAIL FROM:<' . $config['board_contact'] . '>');
if ($err_msg = $smtp->server_parse('250', __LINE__)) if ($err_msg = $smtp->server_parse('250', __LINE__))
{ {
$smtp->close_session($err_msg); $smtp->close_session($err_msg);

View file

@ -1107,7 +1107,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
{ {
$messenger->template($email_template, $addr['lang']); $messenger->template($email_template, $addr['lang']);
$messenger->replyto($config['board_email']);
$messenger->to($addr['email'], $addr['name']); $messenger->to($addr['email'], $addr['name']);
$messenger->im($addr['jabber'], $addr['name']); $messenger->im($addr['jabber'], $addr['name']);

View file

@ -1610,7 +1610,6 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
{ {
$messenger->template('privmsg_notify', $addr['lang']); $messenger->template('privmsg_notify', $addr['lang']);
$messenger->replyto($config['board_email']);
$messenger->to($addr['email'], $addr['name']); $messenger->to($addr['email'], $addr['name']);
$messenger->im($addr['jabber'], $addr['name']); $messenger->im($addr['jabber'], $addr['name']);

View file

@ -2077,7 +2077,6 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
{ {
$messenger->template('group_approved', $row['user_lang']); $messenger->template('group_approved', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -549,7 +549,6 @@ function approve_post($post_id_list, $id, $mode)
$messenger->template($email_template, $post_data['user_lang']); $messenger->template($email_template, $post_data['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($post_data['user_email'], $post_data['username']); $messenger->to($post_data['user_email'], $post_data['username']);
$messenger->im($post_data['user_jabber'], $post_data['username']); $messenger->im($post_data['user_jabber'], $post_data['username']);
@ -772,7 +771,6 @@ function disapprove_post($post_id_list, $id, $mode)
$messenger->template($email_template, $post_data['user_lang']); $messenger->template($email_template, $post_data['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($post_data['user_email'], $post_data['username']); $messenger->to($post_data['user_email'], $post_data['username']);
$messenger->im($post_data['user_jabber'], $post_data['username']); $messenger->im($post_data['user_jabber'], $post_data['username']);

View file

@ -482,7 +482,6 @@ function close_report($post_id_list, $mode, $action)
$messenger->template('report_' . $action . 'd', $reporter['user_lang']); $messenger->template('report_' . $action . 'd', $reporter['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($reporter['user_email'], $reporter['username']); $messenger->to($reporter['user_email'], $reporter['username']);
$messenger->im($reporter['user_jabber'], $reporter['username']); $messenger->im($reporter['user_jabber'], $reporter['username']);

View file

@ -84,7 +84,6 @@ class ucp_activate
$messenger->template('admin_welcome_activated', $user_row['user_lang']); $messenger->template('admin_welcome_activated', $user_row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($user_row['user_email'], $user_row['username']); $messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);

View file

@ -183,7 +183,6 @@ class ucp_groups
{ {
$messenger->template($email_template, $row['user_lang']); $messenger->template($email_template, $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -130,7 +130,6 @@ class ucp_profile
$template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate'; $template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate';
$messenger->template($template_file, $user->data['user_lang']); $messenger->template($template_file, $user->data['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($data['email'], $data['username']); $messenger->to($data['email'], $data['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
@ -167,7 +166,6 @@ class ucp_profile
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$messenger->template('admin_activate', $row['user_lang']); $messenger->template('admin_activate', $row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -321,7 +321,6 @@ class ucp_register
$messenger->template($email_template, $data['lang']); $messenger->template($email_template, $data['lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($data['email'], $data['username']); $messenger->to($data['email'], $data['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
@ -369,7 +368,6 @@ class ucp_register
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$messenger->template('admin_activate', $row['user_lang']); $messenger->template('admin_activate', $row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -64,7 +64,6 @@ class ucp_remind
$messenger->template('user_activate_passwd', $user_row['user_lang']); $messenger->template('user_activate_passwd', $user_row['user_lang']);
$messenger->replyto($user->data['user_email']);
$messenger->to($user_row['user_email'], $user_row['username']); $messenger->to($user_row['user_email'], $user_row['username']);
$messenger->im($user_row['user_jabber'], $user_row['username']); $messenger->im($user_row['user_jabber'], $user_row['username']);

View file

@ -67,8 +67,6 @@ class ucp_resend
if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa) if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
{ {
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']); $messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($user_row['user_email'], $user_row['username']); $messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
@ -107,7 +105,6 @@ class ucp_resend
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$messenger->template('admin_activate', $row['user_lang']); $messenger->template('admin_activate', $row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($row['user_email'], $row['username']); $messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);

View file

@ -1750,7 +1750,6 @@ class install_install extends module
$messenger->template('installed', $language); $messenger->template('installed', $language);
$messenger->replyto($config['board_contact']);
$messenger->to($board_email1, $admin_name); $messenger->to($board_email1, $admin_name);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);

View file

@ -369,13 +369,13 @@ $lang = array_merge($lang, array(
'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.', 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.',
'ADMIN_EMAIL' => 'Return email address', 'ADMIN_EMAIL' => 'Return email address',
'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails.', 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails, the technical contact email address. It will always be used as the <samp>Return-Path</samp> and <samp>Sender</samp> address in emails.',
'BOARD_EMAIL_FORM' => 'Users send email via board', 'BOARD_EMAIL_FORM' => 'Users send email via board',
'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.', 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.',
'BOARD_HIDE_EMAILS' => 'Hide email addresses', 'BOARD_HIDE_EMAILS' => 'Hide email addresses',
'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.', 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.',
'CONTACT_EMAIL' => 'Contact email address', 'CONTACT_EMAIL' => 'Contact email address',
'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc.', 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in emails.',
'EMAIL_FUNCTION_NAME' => 'Email function name', 'EMAIL_FUNCTION_NAME' => 'Email function name',
'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.', 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.',
'EMAIL_PACKAGE_SIZE' => 'Email package size', 'EMAIL_PACKAGE_SIZE' => 'Email package size',

View file

@ -10,7 +10,7 @@ You can find it at:
{U_TOPIC} {U_TOPIC}
A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this email please contact the board administrator at {BOARD_EMAIL}. Please quote the the message headers when contacting this address. A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this email please contact the board administrator at {BOARD_CONTACT}. Please quote the the message headers when contacting this address.
---------- ----------

View file

@ -3,7 +3,7 @@ Hello {TO_USERNAME},
The following is an email sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: The following is an email sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
{BOARD_EMAIL} {BOARD_CONTACT}
Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}. Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}.

View file

@ -3,7 +3,7 @@ Hello {TO_USERNAME},
The following is a message sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: The following is a message sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
{BOARD_EMAIL} {BOARD_CONTACT}
Include this full message. Please note that the sender address has been set to the boards IM account. Include this full message. Please note that the sender address has been set to the boards IM account.

View file

@ -305,7 +305,7 @@ switch ($mode)
$messenger->im($row['user_jabber'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array( $messenger->assign_vars(array(
'BOARD_EMAIL' => $config['board_contact'], 'BOARD_CONTACT' => $config['board_contact'],
'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']), 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
'TO_USERNAME' => htmlspecialchars_decode($row['username']), 'TO_USERNAME' => htmlspecialchars_decode($row['username']),
'MESSAGE' => htmlspecialchars_decode($message)) 'MESSAGE' => htmlspecialchars_decode($message))
@ -780,7 +780,7 @@ switch ($mode)
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->assign_vars(array( $messenger->assign_vars(array(
'BOARD_EMAIL' => $config['board_contact'], 'BOARD_CONTACT' => $config['board_contact'],
'TO_USERNAME' => htmlspecialchars_decode($row['to_name']), 'TO_USERNAME' => htmlspecialchars_decode($row['to_name']),
'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']), 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
'MESSAGE' => htmlspecialchars_decode($message)) 'MESSAGE' => htmlspecialchars_decode($message))

View file

@ -25,7 +25,7 @@
{admin.GROUP_NAME} {admin.GROUP_NAME}
<!-- ENDIF --> <!-- ENDIF -->
&nbsp;</td> &nbsp;</td>
<td class="gen" align="center">{admin.RANK_IMG}</td> <td class="gen" align="center"><!-- IF admin.RANK_IMG -->{admin.RANK_IMG}<!-- ELSE -->{admin.RANK_TITLE}<!-- ENDIF --></td>
<td class="gen" align="center">&nbsp;<!-- IF admin.U_PM --><a href="{admin.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td> <td class="gen" align="center">&nbsp;<!-- IF admin.U_PM --><a href="{admin.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
</tr> </tr>
<!-- BEGINELSE --> <!-- BEGINELSE -->
@ -48,7 +48,7 @@
{mod.GROUP_NAME} {mod.GROUP_NAME}
<!-- ENDIF --> <!-- ENDIF -->
&nbsp;</td> &nbsp;</td>
<td class="gen" align="center">{mod.RANK_IMG}</td> <td class="gen" align="center"><!-- IF mod.RANK_IMG -->{mod.RANK_IMG}<!-- ELSE -->{mod.RANK_TITLE}<!-- ENDIF --></td>
<td class="gen" align="center">&nbsp;<!-- IF mod.U_PM --><a href="{mod.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td> <td class="gen" align="center">&nbsp;<!-- IF mod.U_PM --><a href="{mod.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
</tr> </tr>
<!-- BEGINELSE --> <!-- BEGINELSE -->