SMTP server issue [message #160746] |
Tue, 20 October 2009 17:47 |
jshreve
Messages: 3 Registered: January 2003 Location: Keller, TX
Karma: 0
|
Junior Member |
|
|
FUDforum version is 2.8.1.
In file smtp.inc.t in function function open_smtp_connex(), when determining the smtp server, the code is as follows:
**********
$smtp_srv = $_SERVER["SERVER_NAME"];
if ($smtp_srv == 'localhost' || $smtp_srv == '127.0.0.1') {
$smtp_srv = 'FUDforum SMTP server';
}
$this->wts(($es ? 'EHLO ' : 'HELO ').$smtp_srv);
***********
In my configuration, I use "localhost" as the smtp server.
Problem 1: If this code is executed by via script, i/e,
nntp.php, when importing posts from a news server,
variable $_SERVER["SERVER_NAME"] does not exist, so,
the following error occurs when email notifications
are sent:
***
PHP Notice: Undefined index: SERVER_NAME in /var/www/forums/include/theme/default/smtp.inc on line 42
***
Problem 2. The first line sets $smtp_srv to my external domain
name, so, my smtp server config of "localhost"
would appear to be ignored.
As a workaround, I have replaced the above code with the statement:
****
$this->wts(($es ? 'EHLO ' : 'HELO ').$GLOBALS['FUD_SMTP_SERVER']);
****
which is the way it used to be in version 2.7.7
Thanks
|
|
|