summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-25 10:17:35 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-25 10:17:35 +0000
commit0a4d50ade202cd147fafd8b5ac3344f8aaa30f53 (patch)
treee91cf3372c1ee97c04cb6968efc7cc43ab37f85e
parent208d2b088271be1fc468649e994e8cad82911e0e (diff)
* introduced isset() because that is how you test if a var is set (which is why a NOTICE is a good idea to look at sometimes)
* fixed a bug - $smtp_conn was checked, but it's actually called $SMTP_CONN, now the connection is really being re-used git-svn-id: https://svn.roundcube.net/trunk@1136 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_smtp.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_smtp.inc b/roundcubemail/program/include/rcube_smtp.inc
index f1402742e..2c474746d 100644
--- a/roundcubemail/program/include/rcube_smtp.inc
+++ b/roundcubemail/program/include/rcube_smtp.inc
@@ -62,19 +62,19 @@ function smtp_mail($from, $recipients, &$headers, &$body, &$response)
$smtp_host_url = parse_url($CONFIG['smtp_server']);
// overwrite port
- if ($smtp_host_url['host'] && $smtp_host_url['port'])
+ if (isset($smtp_host_url['host']) && isset($smtp_host_url['port']))
{
$smtp_host = $smtp_host_url['host'];
$smtp_port = $smtp_host_url['port'];
}
// re-write smtp host
- if ($smtp_host_url['host'] && $smtp_host_url['scheme'])
+ if (isset($smtp_host_url['host']) && isset($smtp_host_url['scheme']))
$smtp_host = sprintf('%s://%s', $smtp_host_url['scheme'], $smtp_host_url['host']);
// create Net_SMTP object and connect to server
- if (!is_object($smtp_conn))
+ if (!is_object($SMTP_CONN))
{
$helo_host = empty($CONFIG['smtp_helo_host']) ? (empty($_SERVER['SERVER_NAME']) ? 'localhost' : $_SERVER['SERVER_NAME']) : $CONFIG['smtp_helo_host'];
$SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host);