my $smtp = Net::SMTP->new(...); $smtp->starttls or die; print "encrypting with cipher=".$smtp->get_cipher."\n";