<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># --
# Kernel/System/Email/SMTPTLS.pm - email send backend for SMTP/TLS
# Copyright (C) 2001-2014 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

package Kernel::System::Email::SMTPTLS;

use strict;
use warnings;

use Net::SSLGlue::SMTP;

use base qw(Kernel::System::Email::SMTP);

sub _Connect {
    my ( $Self, %Param ) = @_;

    # check needed stuff
    for (qw(MailHost FQDN)) {
        if ( !$Param{$_} ) {
            $Self-&gt;{LogObject}-&gt;Log( Priority =&gt; 'error', Message =&gt; "Need $_!" );
            return;
        }
    }

    # set up connection connection
    my $SMTP = Net::SMTP-&gt;new(
        $Param{MailHost},
        Hello   =&gt; $Param{FQDN},
        Port    =&gt; $Param{SMTPPort} || 587,
        Timeout =&gt; 30,
        Debug   =&gt; $Param{SMTPDebug},
    );
    return if !$SMTP;
    $SMTP-&gt;starttls(
        SSL_verify_mode =&gt; 0,
    );
    return $SMTP;
}

1;
</pre></body></html>