function SmtpTransport::setLocalDomain
Sets the name of the local domain that will be used in HELO.
This should be a fully-qualified domain name and should be truly the domain you're using.
If your server does not have a domain name, use the IP address. This will automatically be wrapped in square brackets as described in RFC 5321, section 4.1.3.
Return value
$this
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 109
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
public function setLocalDomain(string $domain) : static {
if ('' !== $domain && '[' !== $domain[0]) {
if (filter_var($domain, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) {
$domain = '[' . $domain . ']';
}
elseif (filter_var($domain, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) {
$domain = '[IPv6:' . $domain . ']';
}
}
$this->domain = $domain;
return $this;
}