mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/8558] Add display name in emails from board
PHPBB3-8558
This commit is contained in:
parent
0da5e3bee9
commit
40c685e6fc
3 changed files with 19 additions and 2 deletions
|
@ -434,6 +434,7 @@ class acp_board
|
||||||
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
|
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
|
||||||
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
|
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
|
||||||
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
||||||
|
'board_contact_name' => array('lang' => 'CONTACT_EMAIL_NAME', 'validate' => 'string', 'type' => 'text:30:50', 'explain' => true),
|
||||||
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
||||||
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
|
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
|
||||||
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
|
|
|
@ -486,12 +486,26 @@ class messenger
|
||||||
|
|
||||||
if (empty($this->replyto))
|
if (empty($this->replyto))
|
||||||
{
|
{
|
||||||
$this->replyto = '<' . $config['board_contact'] . '>';
|
if ($config['board_contact_name'])
|
||||||
|
{
|
||||||
|
$this->replyto = '"' . mail_encode($config['board_contact_name']) . '" <' . $config['board_contact'] . '>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->replyto = '<' . $config['board_contact'] . '>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->from))
|
if (empty($this->from))
|
||||||
{
|
{
|
||||||
$this->from = '<' . $config['board_contact'] . '>';
|
if ($config['board_contact_name'])
|
||||||
|
{
|
||||||
|
$this->from = '"' . mail_encode($config['board_contact_name']) . '" <' . $config['board_contact'] . '>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->from = '<' . $config['board_contact'] . '>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol;
|
$encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol;
|
||||||
|
|
|
@ -524,6 +524,8 @@ $lang = array_merge($lang, array(
|
||||||
'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. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in emails.',
|
'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.',
|
||||||
|
'CONTACT_EMAIL_NAME' => 'Contact name',
|
||||||
|
'CONTACT_EMAIL_NAME_EXPLAIN' => 'This is the contact name that e-mail recipients see. Leave blank to just send the e-mail address',
|
||||||
'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',
|
||||||
|
|
Loading…
Add table
Reference in a new issue