Update of /var/cvs/contributions/didactor2/src/email/java/nl/didactor/builders
In directory james.mmbase.org:/tmp/cvs-serv13280
Modified Files:
EmailBuilder.java
Log Message:
not depending on the silly commit processor if wanting to sent mail
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/email/java/nl/didactor/builders
Index: EmailBuilder.java
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/email/java/nl/didactor/builders/EmailBuilder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- EmailBuilder.java 1 Aug 2008 11:51:46 -0000 1.12
+++ EmailBuilder.java 1 Aug 2008 12:57:51 -0000 1.13
@@ -80,18 +80,24 @@
log.error("Cannot send mail '" + node + "'");
// TODO: we have to notify the user that something went wrong.
Ideally, a bounce message
}
+ } else {
+ log.debug("Nothing to do, type is not " + TYPE_TOSEND + " but " +
node.getIntValue("type"));
}
return node;
}
{
addFunction(new NodeFunction("startmail", MAIL_PARAMETERS,
ReturnType.VOID) {
protected Object getFunctionValue(final Node node, Parameters
parameters) {
- log.debug("We're in startmail - args: " + parameters);
+ if (log.isDebugEnabled()) {
+ log.debug("We're in startmail - args: " + parameters +
" type " + node.getIntValue("type"));
+ }
if (node.getIntValue("type") == TYPE_NORMAL) {
+ log.debug("Sending");
org.mmbase.util.ThreadPools.jobsExecutor.execute(new
Runnable() {
public void run() {
- node.setIntValue("type", TYPE_TOSEND);
- node.commit();
+ log.debug("Sending now!");
+ boolean success = sendmail.sendMail(node);
+ log.debug("Success: " + success);
}
});
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs