PHPMailer\PHPMailer
SMTP::hello
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.
Method of the class: SMTP{}
No Hooks.
Returns
true|false.
Usage
$SMTP = new SMTP(); $SMTP->hello( $host );
- $host(string)
- The host name or IP to connect to.
Default:''
SMTP::hello() SMTP::hello code WP 7.0
public function hello($host = '')
{
//Try extended hello first (RFC 2821)
if ($this->sendHello('EHLO', $host)) {
return true;
}
//Some servers shut down the SMTP service here (RFC 5321)
if (substr($this->helo_rply, 0, 3) == '421') {
return false;
}
return $this->sendHello('HELO', $host);
}