1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

debug values config panel removing all mail values, only smtp

This commit is contained in:
rodinux 2024-08-18 21:10:40 +02:00
parent 08cbd66de3
commit 6bf6262d96
4 changed files with 1 additions and 11 deletions

View file

@ -600,7 +600,7 @@ const SMTP_SECURITY = '__SMTP_SECURITY__';
* Défaut : null
*/
const MAIL_SENDER = '__MAIL_SENDER__';
//const MAIL_SENDER = 'associations@monserveur.com';
/**
* Mot de passe pour l'accès à l'API permettant de gérer les mails d'erreur

View file

@ -50,8 +50,3 @@ name.fr = "Configuration SMTP"
choices.STARTTLS = "STARTTLS, utilisation de STARTTLS (moyennement sécurisé)"
bind = "SMTP_SECURITY:__INSTALL_DIR__/config.local.php"
[main.smtp.mail_sender]
ask.fr = "Adresse e-mail expéditrice des messages"
type = "string"
bind = "MAIL_SENDER:__INSTALL_DIR__/config.local.php"

View file

@ -17,7 +17,6 @@ ynh_app_setting_set --app=$app --key=smtp_port --value=25
ynh_app_setting_set --app=$app --key=smtp_user --value=$app
ynh_app_setting_set --app=$app --key=smtp_password --value=$mail_pwd
ynh_app_setting_set --app=$app --key=smtp_security --value=STARTTLS
ynh_app_setting_set --app=$app --key=mail_sender --value=$app@$domain
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -37,23 +37,19 @@ if [ -z "${smtp_host:-}" ]; then
smtp_user=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_USER)
smtp_password=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PASSWORD)
smtp_security=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_SECURITY)
mail_sender=$(ynh_read_var_in_file --file=$user_conf --key=MAIL_SENDER)
ynh_replace_string --match_string="const SMTP_" --replace_string="//const SMTP_" --target_file=$user_conf
ynh_replace_string --match_string="const MAIL_" --replace_string="//const MAIL_" --target_file=$user_conf
else
smtp_host=$domain
smtp_port=25
smtp_user=$app
smtp_password=$mail_pwd
smtp_security=STARTTLS
mail_sender=$app@$domain
fi
ynh_app_setting_set --app=$app --key=smtp_host --value=$smtp_host
ynh_app_setting_set --app=$app --key=smtp_port --value=$smtp_port
ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user
ynh_app_setting_set --app=$app --key=smtp_password --value=$smtp_password
ynh_app_setting_set --app=$app --key=smtp_security --value=$smtp_security
ynh_app_setting_set --app=$app --key=mail_sender --value=$mail_sender
fi
#=================================================