[jira] [Commented] (OFBIZ-10706) EmailServices.sendMail causes a NPE, when sendFrom is missing

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

[jira] [Commented] (OFBIZ-10706) EmailServices.sendMail causes a NPE, when sendFrom is missing

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720535#comment-16720535 ]

Jacques Le Roux commented on OFBIZ-10706:
-----------------------------------------

Hi Benjamin,

This makes sense to me, indeed I prefer 2. I agree that it's weird to send an email in OFBiz w/o send from.

Thinking aloud: it could disrupt some custom projects, so maybe simply catch the NPE and warn the user in UI? Mmm not very effective in jobs and such. Could you start a discussion on dev ML to be sure nobody disagree w/ your patch?

> EmailServices.sendMail causes a NPE, when sendFrom is missing
> -------------------------------------------------------------
>
>                 Key: OFBIZ-10706
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10706
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Benjamin Jugl
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Trunk
>
>         Attachments: OFBIZ-10706_services_Email.xml.patch
>
>
> Because the Error occurs further down in Java, there are two options
>  # Either catch the NPE in sendMail and try to send a mail without a sendFrom field (I doubt that this will work)
>  # Or expand the sendMailOnePartInterface to have sendFrom mandatory just like sendTo
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)