Main Koha release repository
https://koha-community.org
Tomas Cohen Arazi
bbd700ce0b
This patch changes how multipart MIME messages are handled on the message_queue table. The email, with the required attachments, is now generated using Koha::Email, and serialized using Koha::Email->as_string. This bug also adds Koha::Email->new_from_string which is used to read that data from the DB, and produce a Koha::Email object, that can be further augmented/modified using regular Koha::Email methods. This implementation should be considered a middle ground, with backportability in mind. higher-level methods should encapsulate setting the default headers and addresses, to clean the area a bit further. Preparation: - You need a valid SMTP configuration in koha-conf.xml. If you use Gmail you can generate an 'app password' and set things like this: <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>youraddress@gmail.com</user_name> <password>youpassword</password> <debug>1</debug> </smtp_server> - Set KohaAdminAddress to your address. To test: 1. Pick a patron. Make sure it doesn't have any email address (Acevedo?) 2. Set an overdue notice trigger for its category 3. Check something out, with due date in the past to force an overdue 4. Run: $ kshell k$ misc/cronjobs/overdue_notices.pl -v k$ exit $ koha-mysql kohadev > SELECT * FROM message_queue WHERE borrowernumber=the_borrowernumber; => SUCCESS: A notice has been created 5. Run: $ kshell k$ misc/cronjobs/process_message_queue.pl --verbose => SUCCESS: SMTP is ok => Email is sent => FAIL: Your inbox shows an email with weird content 6. Apply this patches 7. Run: $ koha-mysql kohadev > DELETE FROM message_queue; 8. Repeat 4 and 5 => SUCCESS: You got an email with an attachment! => SUCCESS: The attachment contains an email that couldn't be delivered! 9. Try all the things that enqueue messages :-D => SUCCESS: No behavior change 10. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Edited the POD, restoring a few lines that describe the needed hash keys of the attachments. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
acqui | ||
admin | ||
api | ||
authorities | ||
basket | ||
bin | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
lib/CGI/Session/Serialize | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.perlcriticrc | ||
.proverc.dist | ||
.scss-lint.yml | ||
about.pl | ||
app.psgi | ||
changelanguage.pl | ||
cpanfile | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook