Si se construye un socket pero eso lo hace automaticamente la libreria de JavaMail. aca tienes un breve ejemplo de como enviar un mail
String host, usuario, password, de, para, asunto;
host = "smtp.hotmail.com";
de = "
[email protected]";
para = "
[email protected]";
asunto = "ASUNTO";
String Mensaje = "MI CONTENIDO DEL MAIL";
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", host);
Session mailSession = Session.getDefaultInstance(props, null);
mailSession.setDebug(true);
Transport transport = mailSession.getTransport();
MimeMessage message = new MimeMessage(mailSession);
message.setSubject(asunto);
message.setFrom(new InternetAddress(de));
message.setContent(Mensaje, "text/html");
message.addRecipient(Message.RecipientType.TO, new InternetAddress(para));
transport.connect();
transport.sendMessage(message, message.getRecipients(Message.RecipientType.TO));
transport.close();
//EN DONDE DICE transport.connect(); ES DONDE CREA EL SOCKET
//EN LA SIGUIENTE LINEA ES DONDE ENVIA EL MENSAJE
//EN LA ULTIMA ES EN DONDE CIERRA LA CONEXION CON EL SERVIDOR SMTP
//TEN EN CUENTA QUE PARA ESTE CASO USAMOS A HOTMAIL COMO SERVIDOR SMTP, PERO HOTMAIL NO OFRECE SMTP PARA CUENTAS GRATUITAS (SOLO PARA QUE NO PIERDAS EL TIEMPO INTENTANDO SI NO TIENES UNA CUENTA PAGA. LO MEJOR ES MONTAR UN PROPIO SERVIDOR DE CORREOS)
exitos