SF.net SVN: postfixadmin:[1093] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-07-19 21:12:31
|
Revision: 1093 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1093&view=rev Author: christian_boltz Date: 2011-07-19 21:12:25 +0000 (Tue, 19 Jul 2011) Log Message: ----------- 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 Modified Paths: -------------- trunk/config.inc.php trunk/functions.inc.php Modified: trunk/config.inc.php =================================================================== --- trunk/config.inc.php 2011-07-19 20:24:41 UTC (rev 1092) +++ trunk/config.inc.php 2011-07-19 21:12:25 UTC (rev 1093) @@ -72,9 +72,11 @@ ); // Site Admin -// Define the Site Admins email address below. -// This will be used to send emails from to create mailboxes. -$CONF['admin_email'] = 'pos...@ch...d'; +// 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. Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2011-07-19 20:24:41 UTC (rev 1092) +++ trunk/functions.inc.php 2011-07-19 21:12:25 UTC (rev 1093) @@ -1340,6 +1340,19 @@ 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(); +} // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |