From address is null acquisitions claim and serial notice. my $userenv = C4::Context->userenv; $userenv->{emailaddress}
(In reply to Amit from comment #0) > From address is null acquisitions claim and serial notice. > > my $userenv = C4::Context->userenv; > $userenv->{emailaddress} From address contain null value in acquisitions claim and serial notice. my $userenv = C4::Context->userenv; $userenv->{emailaddress}
It has worked nicely for me in the past - does your staff user have an email address? I agree that it's unusual for Koha to use the staff patron's email address, so maybe this should only be an option and not the default.
Hi Katrin, Yes if staff have an email address claim notice is working fine. But this is not a correct behavior. If we modify the code then it will not check whether staff have email address or not. my $email_address = $userenv->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress');
Created attachment 21841 [details] [review] Email sending is not working in claim notice Email sending is not working in claim notice. This patch will not check whether staff patron's email address or not for sending claim notices.
Patch applied cleanly, go forth and signoff
This is changing existing behaviour, with no warning, and no option to keep existing behaviour.
Amit, do you plan to work again on this one?
Hi Jonathan Druart, Yes i have plan will recreate and submit the patch again.
As Chris pointed out, we can't change behaviour without warning - best would be to make this optional.
Thanks Chris & Katrin for suggestion. I will rework & create this feature as a system preference.
Still valid?
Switching from major to new enhancement.
I just looked into this for another reason and it looks like we are now using the branchemail / KohaAdminEmailAdress in SendAlerts: my $mail = Koha::Email->create( { to => join( ',', @email ), cc => join( ',', @cc ), ( ( C4::Context->preference("ClaimsBccCopy") && ( $type eq 'claimacquisition' || $type eq 'claimissues' ) ) ? ( bcc => $userenv->{emailaddress} ) : () ), from => $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'),