#11648 fixed email send with encrypt password

This commit is contained in:
Daniel Cebrian 2023-06-27 15:11:18 +02:00
parent ac25997f45
commit 70ae1f20e4
2 changed files with 10 additions and 3 deletions

View File

@ -2831,7 +2831,7 @@ function config_process_config()
}
if (!isset($config['email_from_dir'])) {
config_update_value('email_from_dir', 'pandora@pandorafms.com/community/');
config_update_value('email_from_dir', 'pandora@pandorafms.com');
}
if (!isset($config['email_from_name'])) {

View File

@ -774,9 +774,16 @@ sub pandora_sendmail {
$mail{Message} = encode("UTF-8", $mail{Message});
$mail{'Content-Type'} = 'text/plain; charset="UTF-8"';
}
if ($pa_config->{"mta_user"} ne ""){
$mail{auth} = {user=>$pa_config->{"mta_user"}, password=>$pa_config->{"mta_pass"}, method=>$pa_config->{"mta_auth"}, required=>1 };
$mail{auth} = {
user=>$pa_config->{"mta_user"},
password=>PandoraFMS::Core::pandora_output_password(
$pa_config,
safe_output($pa_config->{"mta_pass"})
),
method=>$pa_config->{"mta_auth"}, required=>1
};
}
eval {