setec / check-email-loop

Nagios plugin to check email infrastructure via sending & retrieving emails
GNU General Public License v2.0
15 stars 11 forks source link

Using AUTH LOGIN with this Script #3

Open futureweb opened 5 years ago

futureweb commented 5 years ago

As we need AUTH LOGIN on some older Servers and struggled quite a long time to get it running with this Script ... here the Info if someone also needs it ... ;-)

Using "Net::SMTP_auth" (available on CPAN) one can easily use LOGIN Methode ... ;-) Info: https://www.perlmonks.org/?replies=1;displaytype=print;node_id=110334


$smtp = Net::SMTP_auth->new($smtphost, Timeout=>$smtptimeout, Port=>$smtpport, starttls=>1, Hello=>$smtpehlo, %other_smtp_opts);
               if( $smtp && $smtpuser )  {
                                    #print "Sending Mail through SMTP with TLS + AUTH!\n";
                                    $smtp->auth("LOGIN", $smtpuser, $smtppasswd);

bye from Austria Andreas Schnederle-Wagner

setec commented 4 years ago

Thank you Andreas for your feedback: I'll keep this issue open for reference or potentially other users.