]> 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)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sun, 19 Dec 2021 20:15:44 +0000 (21:15 +0100)
commit3ad75ad1859ca0b910c038c488f38ee204883041
tree04dd5d2314f753a1dffbd27dc9e27ba33cc76908
parentb4aec2b7f0f05ef0abb58675e52f061a9dc4e546
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>
(cherry picked from commit 2d6a189e89cc81eff50cdd3a71f7eacc34287b3a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/Email.pm
t/Koha/Email.t