function SmtpTransport::setPingThreshold
Sets the minimum number of seconds required between two messages, before the server is pinged. If the transport wants to send a message and the time since the last message exceeds the specified threshold, the transport will ping the server first (NOOP command) to check if the connection is still alive. Otherwise the message will be sent without pinging the server first.
Do not set the threshold too low, as the SMTP server may drop the connection if there are too many non-mail commands (like pinging the server with NOOP).
By default, the threshold is set to 100 seconds.
Parameters
int $seconds The minimum number of seconds between two messages required to ping the server:
Return value
$this
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 90
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
public function setPingThreshold(int $seconds) : static {
$this->pingThreshold = $seconds;
return $this;
}