This should fix Bug #498451.. Keep it from including smtp.php more than once..

git-svn-id: file:///svn/phpbb/trunk@2007 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
the_systech 2002-01-28 21:03:25 +00:00
parent 0a120aea72
commit 9819d4f777
2 changed files with 6 additions and 2 deletions

View file

@ -194,8 +194,11 @@ class emailer
return FALSE; return FALSE;
} }
if($this->use_smtp) if($this->use_smtp)
{
if(!defined('SMTP_INCLUDED'))
{ {
include($phpbb_root_path . "includes/smtp.".$phpEx); include($phpbb_root_path . "includes/smtp.".$phpEx);
}
if(!smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers)) if(!smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers))
{ {
message_die(GENERAL_ERROR, "Sending via SMTP failed", "", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Sending via SMTP failed", "", __LINE__, __FILE__);

View file

@ -33,6 +33,7 @@
* to the opened socket to the server and the second the * to the opened socket to the server and the second the
* response code you are looking for. * response code you are looking for.
****************************************************************************/ ****************************************************************************/
define('SMTP_INCLUDED', 1);
function server_parse($socket, $response) function server_parse($socket, $response)
{ {
if(!($server_response = fgets($socket, 100))) if(!($server_response = fgets($socket, 100)))