]> git.koha-community.org Git - koha.git/commit
Bug 29330: Add Koha::Email->new_from_string
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 Nov 2021 18:22:25 +0000 (15:22 -0300)
committerKyle Hall <kyle@bywatersolutions.com>
Mon, 22 Nov 2021 18:15:26 +0000 (13:15 -0500)
commit2d6a189e89cc81eff50cdd3a71f7eacc34287b3a
tree0a3ffc22025fff8c2b7b1c5159a3d22ece63c1fd
parent297c6d165f81ab147e9e5330ea9da4d7acfa23e9
Bug 29330: Add Koha::Email->new_from_string

This patch introduces a new method to Koha::Email. This method allows us
to parse a MIME email to initialize the Koha::Email object. This is
particularly important when we are restoring emails from the DB. i.e.
from the *message_queue* table.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/Koha/Email.t
=> SUCCESS: Tests pass! Koha::Email->new_from_string is the correct
counterpart for Koha::Email->as_string!
3. 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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Email.pm
t/Koha/Email.t