diff --git a/src/Mail/SmtpMailer.php b/src/Mail/SmtpMailer.php index 3fc17d7..435af19 100644 --- a/src/Mail/SmtpMailer.php +++ b/src/Mail/SmtpMailer.php @@ -114,9 +114,9 @@ public function send(Message $mail) */ protected function connect() { - $this->connection = @fsockopen( // @ is escalated to exception - ($this->secure === 'ssl' ? 'ssl://' : '') . $this->host, - $this->port, $errno, $error, $this->timeout + $this->connection = @stream_socket_client( // @ is escalated to exception + ($this->secure === 'ssl' ? 'ssl://' : '') . $this->host . ':' . $this->port, + $errno, $error, $this->timeout ); if (!$this->connection) { throw new SmtpException($error, $errno);