moved the code in get_hostname() to send_smtp_command()