1 package Koha::SMTP::Servers;
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
23 use Koha::SMTP::Server;
25 use base qw(Koha::Objects);
29 Koha::SMTP::Servers - Koha SMTP Server Object set class
37 my $server = Koha::SMTP::Servers->new->get_default;
39 Returns the default I<Koha::SMTP::Server> object.
47 my $smtp_config = C4::Context->config('smtp_server');
50 $default = Koha::SMTP::Server->new( $smtp_config );
53 $default = Koha::SMTP::Server->new( $self->default_setting );
56 $default->{_is_system_default} = 1;
60 =head2 Internal methods
64 Return type of object, relating to Schema ResultSet
72 =head3 default_setting
74 my $hash = Koha::SMTP::Servers::default_setting;
76 Returns the default setting that is to be used when no user-defined default
77 SMTP server is provided
87 ssl_mode => 'disabled',
101 return 'Koha::SMTP::Server';