A summary of the communication exchanged between two mail servers during email message delivery is shown in the following image:

The system specifically searches for the acknowledgement with the response code 250 between stages 10 (on the right) and 11 (on the left) - highlighted in YELLOW.
For more informatiion on the SMTP protocol, see SMTP documentation.
Note
The image is for a non-secure connection. If the connection had been an encrypted Secure SMTP (STARTTLS), there would be a preliminary authentication stage (handling TLS creation - AUTH with codes 220, 250, 334, and 235).