]> matita.cs.unibo.it Git - logicplayer.git/commitdiff
Now uses localhost to send e-mail.
authorwww-data <www-data@lahar.helm.cs.unibo.it>
Thu, 11 Dec 2014 18:26:08 +0000 (19:26 +0100)
committerwww-data <www-data@lahar.helm.cs.unibo.it>
Thu, 11 Dec 2014 18:26:08 +0000 (19:26 +0100)
18 files changed:
server/com/company/DirectoryWatcher.class [deleted file]
server/com/company/EmailSender.class [deleted file]
server/com/company/EmailSender.java
server/com/company/EsNameParser.class [deleted file]
server/com/company/MD5.class [deleted file]
server/com/company/dbConnect.class [deleted file]
server/com/company/dbConnect.java
server/com/company/global$dbConstant.class [deleted file]
server/com/company/global$emailConstant.class [deleted file]
server/com/company/global.class [deleted file]
server/com/company/global.java
server/com/company/guestServer.class [deleted file]
server/com/company/httpget$MyHandler.class [deleted file]
server/com/company/httpget.class [deleted file]
server/com/company/personalServer.class [deleted file]
server/com/company/suString.class [deleted file]
server/com/company/superServer.class [deleted file]
server/com/company/xmlOperation.class [deleted file]

diff --git a/server/com/company/DirectoryWatcher.class b/server/com/company/DirectoryWatcher.class
deleted file mode 100644 (file)
index a1666c7..0000000
Binary files a/server/com/company/DirectoryWatcher.class and /dev/null differ
diff --git a/server/com/company/EmailSender.class b/server/com/company/EmailSender.class
deleted file mode 100644 (file)
index 8c301a8..0000000
Binary files a/server/com/company/EmailSender.class and /dev/null differ
index 1abf701b2246c8475f59ee355691a9c7ad55838f..d21d4374580f0a05b942d183c9d605a58272a700 100644 (file)
@@ -42,20 +42,20 @@ public class EmailSender {
  
   // Metodo che si occupa dell'invio effettivo della mail
   public void inviaEmail() {
-    int port = 465; //porta 25 per non usare SSL
+    int port = 25; //porta 465 per usare SSL
  
     Properties props = new Properties();
-    props.put("mail.smtp.auth", "true");
+    props.put("mail.smtp.auth", "false");  /* true to autenticate */
     props.put("mail.smtp.user", mittente);
     props.put("mail.smtp.host", host);
     props.put("mail.smtp.port", port);
  
     // commentare la riga seguente per non usare SSL 
-    props.put("mail.smtp.starttls.enable","true");
+    //props.put("mail.smtp.starttls.enable","true");
     props.put("mail.smtp.socketFactory.port", port);
  
     // commentare la riga seguente per non usare SSL 
-    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
+    //props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
     props.put("mail.smtp.socketFactory.fallback", "false");
  
     Session session = Session.getInstance(props, null);
@@ -91,10 +91,12 @@ public class EmailSender {
       // inserimento delle parti nel messaggio
       msg.setContent(multipart);
  
-      Transport transport = session.getTransport("smtps"); //("smtp") per non usare SSL
+      /*CSC: this code was for handling SMTP authentication
+      Transport transport = session.getTransport("smtp"); //("smtps") per usare SSL
       transport.connect(host, user, password);
       transport.sendMessage(msg, msg.getAllRecipients());
-      transport.close();
+      transport.close();*/
+      Transport.send(msg, msg.getAllRecipients());
  
       System.out.println("Invio dell'email Terminato");
  
diff --git a/server/com/company/EsNameParser.class b/server/com/company/EsNameParser.class
deleted file mode 100644 (file)
index 1820ff1..0000000
Binary files a/server/com/company/EsNameParser.class and /dev/null differ
diff --git a/server/com/company/MD5.class b/server/com/company/MD5.class
deleted file mode 100644 (file)
index 75dca3a..0000000
Binary files a/server/com/company/MD5.class and /dev/null differ
diff --git a/server/com/company/dbConnect.class b/server/com/company/dbConnect.class
deleted file mode 100644 (file)
index fcf7b0e..0000000
Binary files a/server/com/company/dbConnect.class and /dev/null differ
index c89c18e225b8ba44e21c25c72f33e13e38df8353..309a9796dd6a6ed08834c9fed85d9612eb9b145a 100644 (file)
@@ -93,7 +93,7 @@ public class dbConnect
             {
                 EmailSender email = new EmailSender(global.emailConstant.email,
                         global.emailConstant.emailPass,
-                        "smtp.gmail.com",
+                        global.emailConstant.smtpName,
                         global.emailConstant.email,
                         user,
                         "OGGETTO: recupero password LogicPlayer",
diff --git a/server/com/company/global$dbConstant.class b/server/com/company/global$dbConstant.class
deleted file mode 100644 (file)
index 6581574..0000000
Binary files a/server/com/company/global$dbConstant.class and /dev/null differ
diff --git a/server/com/company/global$emailConstant.class b/server/com/company/global$emailConstant.class
deleted file mode 100644 (file)
index 7bc2a14..0000000
Binary files a/server/com/company/global$emailConstant.class and /dev/null differ
diff --git a/server/com/company/global.class b/server/com/company/global.class
deleted file mode 100644 (file)
index d4b2ef3..0000000
Binary files a/server/com/company/global.class and /dev/null differ
index 7c82d27c0c929f111c492715c7bf5168440640d7..134ab626ab594ee3cf3e6d642366d46b77a69d7e 100644 (file)
@@ -17,9 +17,11 @@ public class global {
 
     public static class emailConstant
     {
-        public static String email = "confermaiscrizioneserver@gmail.com";
+        //public static String email = "confermaiscrizioneserver@gmail.com";
+        public static String email = "registration@logicplayer.helm.cs.unibo.it";
         public static String emailPass = "tes6phev8n";
-        public static String smtpName= "smtp.gmail.com";
+        //public static String smtpName= "smtp.gmail.com";
+        public static String smtpName= "localhost";
     }
 
     public static class dbConstant{
diff --git a/server/com/company/guestServer.class b/server/com/company/guestServer.class
deleted file mode 100644 (file)
index be83056..0000000
Binary files a/server/com/company/guestServer.class and /dev/null differ
diff --git a/server/com/company/httpget$MyHandler.class b/server/com/company/httpget$MyHandler.class
deleted file mode 100644 (file)
index f0f55e0..0000000
Binary files a/server/com/company/httpget$MyHandler.class and /dev/null differ
diff --git a/server/com/company/httpget.class b/server/com/company/httpget.class
deleted file mode 100644 (file)
index 2a7e0fb..0000000
Binary files a/server/com/company/httpget.class and /dev/null differ
diff --git a/server/com/company/personalServer.class b/server/com/company/personalServer.class
deleted file mode 100644 (file)
index baf83c9..0000000
Binary files a/server/com/company/personalServer.class and /dev/null differ
diff --git a/server/com/company/suString.class b/server/com/company/suString.class
deleted file mode 100644 (file)
index 6d094cb..0000000
Binary files a/server/com/company/suString.class and /dev/null differ
diff --git a/server/com/company/superServer.class b/server/com/company/superServer.class
deleted file mode 100644 (file)
index cb978cc..0000000
Binary files a/server/com/company/superServer.class and /dev/null differ
diff --git a/server/com/company/xmlOperation.class b/server/com/company/xmlOperation.class
deleted file mode 100644 (file)
index 15f4a2d..0000000
Binary files a/server/com/company/xmlOperation.class and /dev/null differ