You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03: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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user