Update of /var/cvs/applications/email/src/org/mmbase/applications/email
In directory james.mmbase.org:/tmp/cvs-serv13507/applications/email
Modified Files:
SendMail.java
Log Message:
logging only
See also:
http://cvs.mmbase.org/viewcvs/applications/email/src/org/mmbase/applications/email
Index: SendMail.java
===================================================================
RCS file:
/var/cvs/applications/email/src/org/mmbase/applications/email/SendMail.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- SendMail.java 1 Aug 2008 12:32:49 -0000 1.46
+++ SendMail.java 1 Aug 2008 13:10:33 -0000 1.47
@@ -31,7 +31,7 @@
* @author Daniel Ockeloen
* @author Johannes Verelst <[EMAIL PROTECTED]>
* @since MMBase-1.6
- * @version $Id: SendMail.java,v 1.46 2008/08/01 12:32:49 michiel Exp $
+ * @version $Id: SendMail.java,v 1.47 2008/08/01 13:10:33 michiel Exp $
*/
public class SendMail extends AbstractSendMail {
private static final Logger log =
Logging.getLoggerInstance(SendMail.class);
@@ -470,9 +470,6 @@
try {
- if (log.isServiceEnabled()) {
- log.service("JMSendMail sending mail to " + to + " cc:" + cc +
" bcc:" + bcc + " (node " + n.getNumber() + ")" + " from " + from + "
(mime-type " + mimeType + ") using " + session);
- }
// construct a message
MimeMessage msg = new MimeMessage(session);
// msg = super.constructMessage()....
@@ -627,8 +624,16 @@
errors.append("\nIO: " + e.getMessage());
}
*/
-
+ Address[] all = msg.getAllRecipients();
+ if (all != null && all.length > 0) {
+ if (log.isServiceEnabled()) {
+ log.service("JMSendMail sending mail to " + to + " cc:" +
cc + " bcc:" + bcc + " (node " + n.getNumber() + ")" + " from " + from + "
(mime-type " + mimeType + ") using " + session);
+ }
Transport.send(msg, onlyto);
+ } else {
+ log.debug("nothing to do");
+ }
+
log.debug("JMSendMail done.");
} catch (javax.mail.MessagingException e) {
log.error("JMSendMail failure: " + e.getMessage(), e);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs