mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
config.inc.php
- change default of $CONF['admin_email'] to '' and updated the comment. IMPORTANT: If set, this will be used as mail sender for all mails (2.3.x used the currently logged admin's username in most cases). $CONF['admin_email'] = '' will match the 2.3.x behaviour. functions.inc.php: - new function smtp_get_admin_email() to get mail sender address ($CONF[admin_email] or currently logged in admin if not set) - changes compared to Dale's patch: - added @return in comment - switched to /** comment style This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF), https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1093 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
75a9aabc70
commit
28cce0ca37
@ -72,9 +72,11 @@ $CONF['database_tables'] = array (
|
||||
);
|
||||
|
||||
// Site Admin
|
||||
// Define the Site Admins email address below.
|
||||
// This will be used to send emails from to create mailboxes.
|
||||
$CONF['admin_email'] = 'postmaster@change-this-to-your.domain.tld';
|
||||
// Define the Site Admin's email address below.
|
||||
// This will be used to send emails from to create mailboxes and
|
||||
// from Send Email / Broadcast message pages.
|
||||
// Leave blank to send email from the logged-in Admin's Email address.
|
||||
$CONF['admin_email'] = '';
|
||||
|
||||
// Mail Server
|
||||
// Hostname (FQDN) of your mail server.
|
||||
|
@ -1340,6 +1340,19 @@ function smtp_mail ($to, $from, $data, $body = "") {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* smtp_get_admin_email
|
||||
* Action: Get configured email address or current user if nothing configured
|
||||
* Call: smtp_get_admin_email
|
||||
* @return String - username/mail address
|
||||
*/
|
||||
function smtp_get_admin_email() {
|
||||
global $CONF;
|
||||
if(isset($CONF['admin_email']) && !empty($CONF['admin_email']))
|
||||
return $CONF['admin_email'];
|
||||
else
|
||||
return authentication_get_username();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user