function SmtpTransport::__toString
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 172
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
public function __toString() : string {
if ($this->stream instanceof SocketStream) {
$name = \sprintf('smtp%s://%s', ($tls = $this->stream
->isTLS()) ? 's' : '', $this->stream
->getHost());
$port = $this->stream
->getPort();
if (!(25 === $port || $tls && 465 === $port)) {
$name .= ':' . $port;
}
return $name;
}
return 'smtp://sendmail';
}