EmailServices.sendMail causes a NPE, when sendFrom is missing

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

EmailServices.sendMail causes a NPE, when sendFrom is missing

Benjamin Jugl
Hello all,

at the moment an NPE can be thrown by sending an Email (via the service
"sendMail" without giving a value for "sendFrom".

I provided a patch for this in OFBIZ-10706
<https://issues.apache.org/jira/browse/OFBIZ-10706>. This simply alters
the service configuration, so that sendFrom is no longer optional.

Since this might interfere with some of your customer projects and the
usage of sendMail therein, please give me some feedback, if this patch
is in your interest.

Best wishes, Benjamin


Reply | Threaded
Open this post in threaded view
|

Re: EmailServices.sendMail causes a NPE, when sendFrom is missing

Scott Gray-3
Hi Benjamin,

If I were to place a bet, I would say that the system used to provide a
default email address and that code has disappeared for some reason. It
might pay to look at the history of the service and try to determine why it
changed or if it was always broken.

FWIW I always try and look into the history of bugs before fixing them to
better understand the context of how the problem arose.

Regards
Scott

On Fri, 14 Dec 2018, 21:49 Benjamin Jugl <[hidden email] wrote:

> Hello all,
>
> at the moment an NPE can be thrown by sending an Email (via the service
> "sendMail" without giving a value for "sendFrom".
>
> I provided a patch for this in OFBIZ-10706
> <https://issues.apache.org/jira/browse/OFBIZ-10706>. This simply alters
> the service configuration, so that sendFrom is no longer optional.
>
> Since this might interfere with some of your customer projects and the
> usage of sendMail therein, please give me some feedback, if this patch
> is in your interest.
>
> Best wishes, Benjamin
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: EmailServices.sendMail causes a NPE, when sendFrom is missing

Deepak Dixit-4
I agree with Scott, we have a default email address in general.properties
file. And wrapper service should honor this while implementation. It's not
a good idea to make sendFrom options false in sendMail interface.

Thanks & Regards
--
Deepak Dixit



On Sat, Dec 15, 2018 at 4:23 AM Scott Gray <[hidden email]>
wrote:

> Hi Benjamin,
>
> If I were to place a bet, I would say that the system used to provide a
> default email address and that code has disappeared for some reason. It
> might pay to look at the history of the service and try to determine why it
> changed or if it was always broken.
>
> FWIW I always try and look into the history of bugs before fixing them to
> better understand the context of how the problem arose.
>
> Regards
> Scott
>
> On Fri, 14 Dec 2018, 21:49 Benjamin Jugl <[hidden email] wrote:
>
> > Hello all,
> >
> > at the moment an NPE can be thrown by sending an Email (via the service
> > "sendMail" without giving a value for "sendFrom".
> >
> > I provided a patch for this in OFBIZ-10706
> > <https://issues.apache.org/jira/browse/OFBIZ-10706>. This simply alters
> > the service configuration, so that sendFrom is no longer optional.
> >
> > Since this might interfere with some of your customer projects and the
> > usage of sendMail therein, please give me some feedback, if this patch
> > is in your interest.
> >
> > Best wishes, Benjamin
> >
> >
> >
>