At the time the transmission channel is opened there is an exchange to ensure that the hosts are communicating with the hosts they think they are.
The following two commands are used in transmission channel opening and closing:
HELO <SP> <domain> <CRLF> QUIT <CRLF>
In the HELO command the host sending the command identifies itself; the command may be interpreted as saying "Hello, I am <domain>".
Example of Connection Opening R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready S: HELO USC-ISIF.ARPA R: 250 BBN-UNIX.ARPA Example 5
Example of Connection Closing S: QUIT R: 221 BBN-UNIX.ARPA Service closing transmission channel Example 6