Here's my solution for this situation (it was officially submitted). I hope you'd implement it!
Config.php :
Text Formatted Code
// This is the return address for all email sent by Geeklog:
$_CONF['site_mail'] = 'noreply@mydomain.com';
// This is the target address for notifications sent by Geeklog:
// (could be either a uid or a username)
// $_CONF['default_contact'] = 2;
The reason it's disabled is so it doesn't take away anything from existing sites! In other words, you can not use it by mistake as it won't work unless you uncomment it (see below)!
Note that it can either a uid or a username!
system/lib-comment.php (> Geeklog v1.4)
public_html/comment.php (< Geeklog v1.4)
As well as any other file that has notifications!From:
Text Formatted Code
COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody);
To:
Text Formatted Code
notification($mailsubject, $mailbody);
And finally,
lib-common.php (
or something alike):
Text Formatted Code
function notification($mailsubject, $mailbody) {
global $_CONF, $_TABLES;
$result = -1;
if (isset($_CONF['default_contact'])) {
if (is_numeric($_CONF['default_contact']))
$default_type = 'uid';
else
$default_type = 'username';
$result = DB_query("SELECT username,fullname,email FROM {$_TABLES['users']} WHERE $default_type = {$_CONF['default_contact']}");
}
if ($result) {
$A = DB_fetchArray($result);
if (!empty ($A['fullname'])) {
$to = COM_formatEmailAddress ($A['fullname'], $A['email']);
} else {
$to = COM_formatEmailAddress ($A['username'], $A['email']);
}
COM_mail ($to, $mailsubject, $mailbody);
} else
COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody);
}