To establish a connection to an SMTP server, create an Smtp instance providing the SMTP hostname as an argument to the constructor.
Example
Smtp smtp = new Smtp("smtp.myserver.com");
smtp.connect();