Fix issue where the program does not parse the status code

Instead of sending the whole message together with 'data', the program
waits for a 354 reply code and then sends the body, which the server
should reply with a 250 code if successfully sent. The previous workarond
for not being able to send messages back-to-back is because the program
doesn't wait for the last 250 code.