Author: michiel
Date: 2009-05-28 12:34:25 +0200 (Thu, 28 May 2009)
New Revision: 35466

Modified:
   
mmbase/trunk/applications/email/src/org/mmbase/datatypes/VerifyEmailProcessor.java
Log:


Modified: 
mmbase/trunk/applications/email/src/org/mmbase/datatypes/VerifyEmailProcessor.java
===================================================================
--- 
mmbase/trunk/applications/email/src/org/mmbase/datatypes/VerifyEmailProcessor.java
  2009-05-28 09:28:46 UTC (rev 35465)
+++ 
mmbase/trunk/applications/email/src/org/mmbase/datatypes/VerifyEmailProcessor.java
  2009-05-28 10:34:25 UTC (rev 35466)
@@ -113,7 +113,7 @@
                     return new Object[][] {
                         {"body", "{2}"},
                         {"subject", "{0}"},
-                        {"from", ""}
+                        {"from", "[email protected]"}
                     };
                 }
             };
@@ -265,13 +265,20 @@
                 log.debug("Setting " + key + SEP + email + " in " + field);
 
 
-                Cloud cloud = node.getCloud();
+                Cloud cloud = node.getCloud().getNonTransactionalCloud();
 
                 // Send an email.
                 Locale locale = cloud.getLocale();
 
                 ResourceBundle emailTemplate = getResourceBundle(locale);
 
+                if (log.isDebugEnabled()) {
+                    log.debug("Found email template " + emailTemplate + " " + 
emailTemplate.getLocale());
+                    for (String k : Collections.list(emailTemplate.getKeys())) 
{
+                        log.debug(k + "=" + emailTemplate.getString(k));
+                    }
+                }
+
                 Module emailModule   = 
cloud.getCloudContext().getModule("sendmail");
 
 
@@ -311,7 +318,8 @@
 
 
                 String from = emailTemplate.getString("from");
-                if ("".equals(from)) {
+
+                if (! "".equals(from)) {
                     emailNode.setStringValue(fromField, from);
                 }
 
@@ -367,6 +375,7 @@
                     emailNode.delete();
                 }
 
+                log.debug("Using cloud " + cloud);
                 emailNode = cloud.getNode(emailNode.getNumber());
                 try {
                     Function mailFunction = emailNode.getFunction("startmail");

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to