Improved: Remove unnecessary cc and bcc , Applied slightly modified patch from jira issue.
(OFBIZ-9231) Thanks Suraj Khurana for your contribution. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1786116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -137,8 +137,12 @@ public class EmailServices {
|
||||
// check to see if we should redirect all mail for testing
|
||||
String redirectAddress = EntityUtilProperties.getPropertyValue("general", "mail.notifications.redirectTo", delegator);
|
||||
if (UtilValidate.isNotEmpty(redirectAddress)) {
|
||||
String originalRecipients = " [To: " + sendTo + ", Cc: " + sendCc + ", Bcc: " + sendBcc + "]";
|
||||
subject += originalRecipients;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" [To: ").append(sendTo);
|
||||
if (UtilValidate.isNotEmpty(sendCc)) sb.append(", Cc: ").append(sendCc);
|
||||
if (UtilValidate.isNotEmpty(sendBcc)) sb.append(", Bcc: ").append(sendBcc);
|
||||
sb.append("]");
|
||||
subject += sb.toString();
|
||||
sendTo = redirectAddress;
|
||||
sendCc = null;
|
||||
sendBcc = null;
|
||||
|
||||
Reference in New Issue
Block a user