function SMTP::hello

5.x SMTP.php public SMTP::hello($host = '')

Send an SMTP HELO or EHLO command. Used to identify the sending server to the receiving server. This makes sure that client and server are in a known state. Implements RFC 821: HELO <SP> <domain> <CRLF> and RFC 2821 EHLO.

Parameters

string $host The host name or IP to connect to:

Return value

bool

File

inc/PHPMailer/src/SMTP.php, line 733

Class

SMTP
PHPMailer RFC821 SMTP email transport class. Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.

Code

public function hello($host = '') {
  //Try extended hello first (RFC 2821)
  return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host);
}