Check if open SMTP connection is closed/timed out

clarkk asked:

Is it possible to send some sort of ping to a SMTP server to check if the connection is still open and ready to send a mail

The connection is a keep alive and want to check if the connection is closed/timed out

Or is it possible to send a no operation command to keep the connection alive?

My answer:


A very quick look through the RFC shows the SMTP NOOP command.

   This command does not affect any parameters or previously entered
   commands.  It specifies no action other than that the receiver send a
   "250 OK" reply.

   This command has no effect on the reverse-path buffer, the forward-
   path buffer, or the mail data buffer, and it may be issued at any
   time.  If a parameter string is specified, servers SHOULD ignore it.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.