"Applied fix from trunk for revision: 1856667 "

------------------------------------------------------------------------
r1856667 | jleroux | 2019-03-31 11:14:16 +0200 (dim. 31 mars 2019) | 10 lignes

Fixed: EmailServices.sendMail causes a NPE, when sendFrom is missing
(OFBIZ-10706)

I tried to find the history for why the service does not take the 
defaultFromEmailAddress property from general.properties and I found that It was 
last modified in revision r418498 on 02/07/2006, I think it was always broken.

This uses defaultFromEmailAddress property in sendMail if sendFrom is missing

Thanks: Benjanmin Jugl reported, Pawan Verma fixed and others for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856669 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2019-03-31 09:17:06 +00:00
parent beabbbd75d
commit c339325d30
@@ -156,6 +156,9 @@ public class EmailServices {
}
String sendFrom = (String) context.get("sendFrom");
if (UtilValidate.isEmpty(sendFrom)) {
sendFrom = EntityUtilProperties.getPropertyValue("general", "defaultFromEmailAddress", delegator);
}
String sendType = (String) context.get("sendType");
String port = (String) context.get("port");
String socketFactoryClass = (String) context.get("socketFactoryClass");