You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/08/07 05:34:00 UTC
[jira] [Closed] (OFBIZ-13477) sendFailureNotification NPEs on default sendFrom, masking the original SMTP send failure
[ https://issues.apache.org/jira/browse/OFBIZ-13477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13477.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.08
Resolution: Fixed
> sendFailureNotification NPEs on default sendFrom, masking the original SMTP send failure
> ----------------------------------------------------------------------------------------
>
> Key: OFBIZ-13477
> URL: https://issues.apache.org/jira/browse/OFBIZ-13477
> Project: OFBiz
> Issue Type: Bug
> Components: framework/common
> Affects Versions: 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
> Fix For: Upcoming Branch, 24.09.08
>
>
> {{EmailServices.sendMail()}} resolves a local {{sendFrom}} with a fallback to {{general.defaultFromEmailAddress}} when the caller doesn't pass one explicitly (EmailServices.java:162-165). But when an SMTP send fails and {{sendFailureNotification()}} is invoked (EmailServices.java:365), it builds its bounce-notification context from the raw {{context.get("sendFrom")}} input instead of that resolved value.
> If the caller relied on the default-from fallback, {{context.get("sendFrom")}} is null, so the notification ends up with {{sendFrom=null}} and {{sendTo=null}}. The recursive {{sendMailMultiPart}} call then throws a NullPointerException in {{mail.addRecipients(Message.RecipientType.TO, sendTo)}}, rolling back the transaction and masking the original send-failure error.
> *Fix:* pass the resolved {{sendFrom}} into {{sendFailureNotification()}} explicitly instead of re-reading it from {{context}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)