You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/12/28 20:52:43 UTC
svn commit: r894236 - in /ofbiz/trunk/framework/common:
config/general.properties src/org/ofbiz/common/email/EmailServices.java
Author: lektran
Date: Mon Dec 28 19:52:43 2009
New Revision: 894236
URL: http://svn.apache.org/viewvc?rev=894236&view=rev
Log:
The sendMail service has a problem where any email addresses that fail a RCPT TO: SMTP check causes the message to not be sent to any of the valid recipients. Fixed by making use of the mail.smtp.sendpartial property which enables the message to still be delivered to valid recipients. I've made sendpartial = true the default but also made it configurable via general.properties. This is the first part of a fix for OFBIZ-3379
Modified:
ofbiz/trunk/framework/common/config/general.properties
ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
Modified: ofbiz/trunk/framework/common/config/general.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/general.properties?rev=894236&r1=894235&r2=894236&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/general.properties (original)
+++ ofbiz/trunk/framework/common/config/general.properties Mon Dec 28 19:52:43 2009
@@ -103,6 +103,10 @@
# -- debug SMTP mail option enabled (Y|N)
mail.debug.on=N
+# -- if some addresses fail the SMTP check using the RCPT TO: command then setting this property to false will abort sending the message
+# to any recipients valid or not
+mail.smtp.sendpartial=true
+
# -- HTTP upload settings
# -- directory used to temporarily store files that are larger than the configured size threshold (10K)
http.upload.max.sizethreshold=10240
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=894236&r1=894235&r2=894236&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Mon Dec 28 19:52:43 2009
@@ -207,6 +207,8 @@
if (useSmtpAuth) {
props.put("mail.smtp.auth", "true");
}
+ boolean sendPartial = UtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.smtp.sendpartial", "true");
+ props.put("mail.smtp.sendpartial", sendPartial ? "true" : "false");
session = Session.getInstance(props);
boolean debug = UtilProperties.propertyValueEqualsIgnoreCase("general.properties", "mail.debug.on", "Y");