Java - Urgentísimo. Para hoy a la mañana

 
Vista:

Urgentísimo. Para hoy a la mañana

Publicado por Rubén (42 intervenciones) el 19/09/2006 06:13:41
tengo una clase correo tal que asi:

public class Correo
{
public void enviar (String T, String F , String H) throws Exception {
String host = "H";
String from = "F";
String to = T;

// Get system properties
Properties props = System.getProperties();

// Setup mail server
props.put("mail.smtp.host", host);

// Get session
Session session = Session.getDefaultInstance(props, null);

// Define message
MimeMessage message = new MimeMessage(session);

// Set the from address
message.setFrom(new InternetAddress(from,"Almacén virtual"));

// Set the to address
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));

// Set the subject
message.setSubject("Hello JavaMail");

// Set the content
message.setText("Welcome to JavaMail");

// Send message
Transport.send(message);
}
}

y desde otro trozode código llamo a esta funcion y quiero saber qué tres cosas poner.

cual es el host???

cual es el addressfrom???

el único que sé esel otro, el addresto, que será a kien yo ponga. pero lo otro que pongo???

Muchas gracias atodos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder