Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 30, 2020
1 parent 30e8448 commit 9a86fb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mail/SmtpMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@ protected function connect(): void
stream_set_timeout($this->connection, $this->timeout, 0);
$this->read(); // greeting

$this->write("EHLO $this->clientHost");

if ($this->secure === 'tls') {
$this->write("EHLO $this->clientHost", 250);
$this->write('STARTTLS', 220);
if (!stream_socket_enable_crypto(
$this->connection,
Expand All @@ -173,6 +172,7 @@ protected function connect(): void
}

} else {
$this->write("EHLO $this->clientHost");
$ehloResponse = $this->read();
if ((int) $ehloResponse !== 250) {
$this->write("HELO $this->clientHost", 250);
Expand Down

0 comments on commit 9a86fb6

Please sign in to comment.