svn commit: r789652 - in /ofbiz/trunk: applications/order/data/OrderDemoData.xml applications/order/data/OrderTypeData.xml framework/common/config/general.properties framework/common/script/org/ofbiz/common/email/EmailServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r789652 - in /ofbiz/trunk: applications/order/data/OrderDemoData.xml applications/order/data/OrderTypeData.xml framework/common/config/general.properties framework/common/script/org/ofbiz/common/email/EmailServices.xml

hansbak-2
Author: hansbak
Date: Tue Jun 30 10:19:59 2009
New Revision: 789652

URL: http://svn.apache.org/viewvc?rev=789652&view=rev
Log:
OFBIZ-2657: implemented the addition of the default 'from' email address

Modified:
    ofbiz/trunk/applications/order/data/OrderDemoData.xml
    ofbiz/trunk/applications/order/data/OrderTypeData.xml
    ofbiz/trunk/framework/common/config/general.properties
    ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml

Modified: ofbiz/trunk/applications/order/data/OrderDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/data/OrderDemoData.xml?rev=789652&r1=789651&r2=789652&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/data/OrderDemoData.xml (original)
+++ ofbiz/trunk/applications/order/data/OrderDemoData.xml Tue Jun 30 10:19:59 2009
@@ -19,20 +19,6 @@
 -->
 
 <entity-engine-xml>
-
-    <EmailTemplateSetting
-        emailTemplateSettingId="CUST_REQ_ACCEPTED"
-        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#CreateCustRequestNotification"
-        subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"
-        fromAddress="[hidden email]"/>
-    <EmailTemplateSetting emailTemplateSettingId="CUST_REQ_COMPLETED"
-        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#CompletedCustRequestNotification"
-        subject="OFBiz - Your Request is complete: '${custRequestName}' #CR${custRequestId}"
-        fromAddress="[hidden email]"/>
-    <EmailTemplateSetting emailTemplateSettingId="CUST_REQ_NOTE_ADDED"
-        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#AddNoteCustRequestNotification"
-        subject="OFBiz - A Note has been added to your request: '${custRequestName}' #CR${custRequestId}"
-        fromAddress="[hidden email]"/>
     
     <!-- incoming customer request examples -->
     <Party partyId="DemoCustomer"/>

Modified: ofbiz/trunk/applications/order/data/OrderTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/data/OrderTypeData.xml?rev=789652&r1=789651&r2=789652&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/data/OrderTypeData.xml (original)
+++ ofbiz/trunk/applications/order/data/OrderTypeData.xml Tue Jun 30 10:19:59 2009
@@ -342,4 +342,16 @@
     <OrderContentType description="Image" hasTable="N" parentTypeId="" orderContentTypeId="IMAGE_URL"/>
 
     <WebSite webSiteId="OrderEntry" siteName="Order Entry Web Site" visualThemeSetId="BACKOFFICE"/>
+
+    <EmailTemplateSetting
+        emailTemplateSettingId="CUST_REQ_ACCEPTED"
+        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#CreateCustRequestNotification"
+        subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"/>
+    <EmailTemplateSetting emailTemplateSettingId="CUST_REQ_COMPLETED"
+        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#CompletedCustRequestNotification"
+        subject="OFBiz - Your Request is complete: '${custRequestName}' #CR${custRequestId}"/>
+    <EmailTemplateSetting emailTemplateSettingId="CUST_REQ_NOTE_ADDED"
+        bodyScreenLocation="component://order/widget/ordermgr/RequestScreens.xml#AddNoteCustRequestNotification"
+        subject="OFBiz - A Note has been added to your request: '${custRequestName}' #CR${custRequestId}"/>
+    
 </entity-engine-xml>

Modified: ofbiz/trunk/framework/common/config/general.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/general.properties?rev=789652&r1=789651&r2=789652&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/general.properties (original)
+++ ofbiz/trunk/framework/common/config/general.properties Tue Jun 30 10:19:59 2009
@@ -59,6 +59,12 @@
 # -- USPS address matching string - should be all lower case, no spaces, pipe delimited
 usps.address.match=(^.*?p[\\. ]*o[\\. ]*box.*$)|(^.*?post.*?office.*?box.*$)|((^|(^.*? ))r[\\. ]*r[\\. ]*(( +)|([0-9#]+)).*$)|(^.*?rural.*?route.*$)
 
+# -- general default 'fromEmailAddress' can be overridden in: EmailTemplateSetting
+defaultFromEmailAddress=[hidden email]
+
+# -- The default domainname used in the notification emails links
+# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file.
+
 # -- mail notifications enabled (Y|N)
 mail.notifications.enabled=N
 

Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml?rev=789652&r1=789651&r2=789652&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml Tue Jun 30 10:19:59 2009
@@ -47,7 +47,12 @@
             <set field="emailParams.bodyScreenUri" from-field="emailTemplateSetting.bodyScreenLocation"/>
             <set field="emailParams.xslfoAttachScreenLocation" from-field="emailTemplateSetting.xslfoAttachScreenLocation"/>
             <set field="emailParams.partyId" from-field="parameters.partyIdTo"/>
-            <set field="emailParams.sendFrom" from-field="emailTemplateSetting.fromAddress"/>
+            <if-not-empty field="emailTemplateSetting.fromAddress">
+                <set field="emailParams.sendFrom" from-field="emailTemplateSetting.fromAddress"/>
+                <else>
+                    <property-to-field resource="general" property="defaultFromEmailAddress" field="emailParams.sendFrom" default="[hidden email]"/>                    
+                </else>
+            </if-not-empty>
             <set field="emailParams.sendCc" from-field="emailTemplateSetting.ccAddress"/>
             <set field="emailParams.sendBcc" from-field="emailTemplateSetting.bccAddress"/>
             <set field="emailParams.subject" from-field="emailTemplateSetting.subject"/>