Archived
1
0

Add sendmail option

This commit is contained in:
Mercier Pierre-Olivier 2013-11-14 16:20:13 +01:00
parent 947aebd490
commit 5247d4db53
2 changed files with 10 additions and 5 deletions

View File

@ -71,7 +71,8 @@ sub log
if ($mail_error && $level <= ERROR)
{
require Email::Sender::Simple qw(sendmail);
require Email::Sender::Simple;
Email::Sender::Simple->import(qw(sendmail));
my $mail = Email::MIME->create(
header_str => [
From => "Roots assistants <root\@$HOSTNAME.acu.epita.fr>",

View File

@ -1512,7 +1512,8 @@ sub cmd_no_strong_auth_view(@)
sub cmd_no_strong_auth_warn(@)
{
require Email::Sender::Simple qw(sendmail);
require Email::Sender::Simple;
Email::Sender::Simple->import(qw(sendmail));
for my $entry (get_no_strong_auth_user())
{
@ -1553,7 +1554,8 @@ Les roots ACU";
sub cmd_no_strong_auth_close(@)
{
require Email::Sender::Simple qw(sendmail);
require Email::Sender::Simple;
Email::Sender::Simple->import(qw(sendmail));
for my $entry (get_no_strong_auth_user())
{
@ -1706,7 +1708,8 @@ sub cmd_ssh_keys_without_passphrase_view(@)
# warn about unprotected keys
sub cmd_ssh_keys_without_passphrase_warn(@)
{
require Email::Sender::Simple qw(sendmail);
require Email::Sender::Simple;
Email::Sender::Simple->import(qw(sendmail));
my $process = sub() {
my $entry = shift;
@ -1760,7 +1763,8 @@ Les roots ACU";
# remove unprotected keys
sub cmd_ssh_keys_without_passphrase_remove(@)
{
require Email::Sender::Simple qw(sendmail);
require Email::Sender::Simple;
Email::Sender::Simple->import(qw(sendmail));
my $process = sub() {
my $entry = shift;