Correct way of waiting for php mailer echo