From 725b21f2d206efb4b34eb95ec3329bc81f66b805 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 22 Jun 2006 15:14:03 +0000 Subject: time to squash some bugs git-svn-id: file:///svn/phpbb/trunk@6114 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_messenger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_messenger.php') diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 5bd9b0ab41..20101f1750 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -808,8 +808,11 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers $smtp = new smtp_class; + $errno = 0; + $errstr = ''; + // Ok we have error checked as much as we can to this point let's get on it already. - if (!$smtp->socket = fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20)) + if (!$smtp->socket = @fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20)) { $err_msg = (isset($user->lang['NO_CONNECT_TO_SMTP_HOST'])) ? sprintf($user->lang['NO_CONNECT_TO_SMTP_HOST'], $errno, $errstr) : "Could not connect to smtp host : $errno : $errstr"; return false; -- cgit v1.2.1