Lines Matching refs:this

100     $this->setServer($server);
101 $this->setEncryption($encryption);
102 $this->setPort($port);
110 $this->timeout = (int) $time;
118 return $this->timeout;
131 $this->server = (string) $server;
139 return $this->server;
151 …if (!$port) $port = ($this->getEncryption() == self::ENC_OFF) ? self::PORT_DEFAULT : self::PORT_SE…
152 $this->port = (int) $port;
160 return $this->port;
168 $this->setRequiresEHLO(true);
169 $this->username = $user;
177 return $this->username;
185 $this->setRequiresEHLO(true);
186 $this->password = $pass;
194 return $this->password;
202 $this->authenticators[$auth->getAuthExtensionName()] = $auth;
219 $this->encryption = (int) $enc;
228 return $this->encryption;
239 if (!$this->handle) throw new Swift_ConnectionException(
240 "The SMTP connection is not alive and cannot be read from." . $this->smtpErrors());
243 while (!feof($this->handle))
246 stream_set_timeout($this->handle, $this->timeout);
247 $tmp = @fgets($this->handle);
248 if ($tmp === false && !feof($this->handle))
253 $this->smtpErrors());
267 if (!$this->handle) throw new Swift_ConnectionException(
269 $this->smtpErrors());
270this->handle, $command . $end) && !empty($command)) throw new Swift_ConnectionException("The SMTP …
278 if ($this->port === null)
280 switch ($this->encryption)
283 $this->port = 465;
286 $this->port = 25;
291 $server = $this->server;
292 if ($this->encryption == self::ENC_TLS) $server = "tls://" . $server;
293 elseif ($this->encryption == self::ENC_SSL) $server = "ssl://" . $server;
298 $log->add("Trying to connect to SMTP server at '" . $server . ":" . $this->port);
301 if (!$this->handle = @fsockopen($server, $this->port, $errno, $errstr, $this->timeout))
303 …$error_msg = "The SMTP connection failed to start [" . $server . ":" . $this->port . "]: fsockopen…
308 $this->handle = null;
311 $this->errno =& $errno;
312 $this->errstr =& $errstr;
320 return " (fsockopen: " . $this->errstr . "#" . $this->errno . ") ";
329 if ($this->getUsername() && $this->getPassword())
331 $this->runAuthenticators($this->getUsername(), $this->getPassword(), $instance);
350 if (empty($this->authenticators))
365 $this->attachAuthenticator(new $class());
375 if (!$this->hasExtension("AUTH"))
382 $this->setExtension("AUTH", array_keys($this->authenticators));
385 foreach ($this->authenticators as $name => $obj)
388 if (in_array($name, $this->getAttributes("AUTH")) || $name{0} == "*")
395 if ($this->authenticators[$name]->isAuthenticated($user, $pass, $swift))
412 "Loaded authenticators: [" . implode(", ", array_keys($this->authenticators)) . "]");
427 if ($this->handle)
429 if (!fclose($this->handle))
431 …nException("The SMTP connection could not be closed for an unknown reason." . $this->smtpErrors());
433 $this->handle = null;
442 return ($this->handle !== null);
450 $this->stop();