close connection on SMTP then socket