james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r833714 - /james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java
Date Sat, 07 Nov 2009 17:02:09 GMT
Author: norman
Date: Sat Nov  7 17:02:09 2009
New Revision: 833714

URL: http://svn.apache.org/viewvc?rev=833714&view=rev
Log:
more usefull logging

Modified:
    james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java

Modified: james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java?rev=833714&r1=833713&r2=833714&view=diff
==============================================================================
--- james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java
(original)
+++ james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/AbstractSendMessageHandler.java
Sat Nov  7 17:02:09 2009
@@ -41,7 +41,6 @@
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMultipart;
-import javax.mail.internet.MimeMessage.RecipientType;
 import javax.servlet.http.HttpSession;
 
 import net.customware.gwt.dispatch.server.ExecutionContext;
@@ -193,8 +192,16 @@
             transport.connect(address, port, null,null);
         }
         
-        logger.info("Send message from " + message.getFrom()[0].toString()+ " to " + message.getRecipients(RecipientType.TO).toString());
-        transport.sendMessage(message, message.getAllRecipients());
+        Address[] recips = message.getAllRecipients();
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < recips.length; i++) {
+            sb.append(recips[i]);
+            if (i != recips.length -1) {
+                sb.append(", ");
+            }
+        }
+        logger.info("Send message from " + message.getFrom()[0].toString()+ " to " + sb.toString());
+        transport.sendMessage(message, recips);
     }
 
     protected void saveSentMessage(User user, Message message) throws MessagingException
{



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message