Foros del Web » Programando para Internet » Javascript » Frameworks JS »

GWT y JavaMail

Estas en el tema de GWT y JavaMail en el foro de Frameworks JS en Foros del Web. Buenas tardes, estoy tratando de crear un proyecto sencillo en Eclipse 3.7.2 en el que pueda enviar un correo electronico desde una cuenta en especifico, ...
  #1 (permalink)  
Antiguo 20/03/2012, 15:05
 
Fecha de Ingreso: marzo-2012
Mensajes: 1
Antigüedad: 12 años, 7 meses
Puntos: 0
GWT y JavaMail

Buenas tardes, estoy tratando de crear un proyecto sencillo en Eclipse 3.7.2 en el que pueda enviar un correo electronico desde una cuenta en especifico, el problema es que cuando ejecuto la aplicacion con GWT me sale los siguientes errores:

[ERROR] [de_vogella_gwt_helloworld] - Line 10: No source code is available for type java.util.Properties; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 10: The method getProperties() is undefined for the type System
[ERROR] [de_vogella_gwt_helloworld] - Line 20: No source code is available for type javax.mail.Session; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 21: No source code is available for type javax.mail.Store; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 30: No source code is available for type javax.mail.Folder; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 35: No source code is available for type javax.mail.Message; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 44: No source code is available for type java.io.BufferedReader; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 45: No source code is available for type java.io.InputStreamReader; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 45: System.in cannot be resolved
[ERROR] [de_vogella_gwt_helloworld] - Line 73: No source code is available for type javax.mail.NoSuchProviderException; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 75: The method exit(int) is undefined for the type System
[ERROR] [de_vogella_gwt_helloworld] - Line 76: No source code is available for type javax.mail.MessagingException; did you forget to inherit a required module?
[ERROR] [de_vogella_gwt_helloworld] - Line 78: The method exit(int) is undefined for the type System
[ERROR] [de_vogella_gwt_helloworld] - Line 95: No source code is available for type javax.mail.Multipart; did you forget to inherit a required module?


Clases:

import javax.mail.*;
import java.util.Properties;


Conexion:

public static void leerMail(String host, String port, String user, String pass) throws Exception {
Properties props = System.getProperties();
props.setProperty("mail.store.protocol", "imaps");
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.smtp.starttls.enable", "true");
props.setProperty("mail.smtp.host", host);
props.setProperty("mail.smtp.port", port);
props.setProperty("mail.smtp.auth", "true");
props.setProperty("mail.smtp.user", user);

try {
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore("imaps");
// session.setDebug(true);
store.connect(host, user, pass);
store.close();
if (!store.isConnected()) {
System.out.println("Email: " + SMTP_AUTH_USER);
System.out.println("Conectando...");
store.connect();

Folder inbox = store.getDefaultFolder().getFolder("INBOX");
inbox.open(Folder.READ_ONLY);
...

Etiquetas: gwt, java, javamail
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:59.