@@ -, +, @@ delivery note displayed "Unhandled email failure, check the logs for further details"). and run misc/cronjobs/process_message_queue.pl after generating notices. nothing in delivery note column. nothing in delivery note column. again. address details. - Install the postfix package inside ktd (sudo apt install postfix) When asked in the wizard, I named mine 'local' - Start smpt-sink with `nohup smtp-sink -u root -D mail 127.0.0.1:25 100 /dev/null 2>&1 &` Option 2 - To test sending emails using a Google account: - Set up an App password for your Google Account - Edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where = your Google email address; = your APP password, not your Google account password): smtp.gmail.com 587 5 STARTTLS GOOGLEACCOUNTUSER GOOGLEAPPPASSWORD 1 --- C4/Letters.pm | 2 +- .../prog/en/modules/members/notices.tt | 32 ++++++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) --- a/C4/Letters.pm +++ a/C4/Letters.pm @@ -1116,7 +1116,7 @@ sub GetQueuedMessages { my $dbh = C4::Context->dbh(); my $statement = << 'ENDSQL'; -SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code +SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code, from_address, to_address, cc_address FROM message_queue ENDSQL --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -94,20 +94,28 @@ [% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %] [% IF ( QUEUED_MESSAGE.failure_code ) %] - [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %] - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower - [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %] - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver - [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details - [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error - [% ELSE %]Error occurred while sending email. + [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %] + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower + [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %] + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver + [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details + [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error + [% ELSE %]Error occurred while sending email. [% END %] [% END %] - [% IF ( QUEUED_MESSAGE.cc_address ) %] - Notice copied to: [% QUEUED_MESSAGE.cc_address | html %] + [% IF ( QUEUED_MESSAGE.status == 'sent' ) %] + [% IF ( QUEUED_MESSAGE.from_address ) %] + from: [% QUEUED_MESSAGE.from_address | html %] + [% END %] + [% IF ( QUEUED_MESSAGE.to_address ) %] + to: [% QUEUED_MESSAGE.to_address | html %] + [% END %] + [% IF ( QUEUED_MESSAGE.cc_address ) %] + cc: [% QUEUED_MESSAGE.cc_address | html %] + [% END %] [% END %] --