diff --git a/dokuwiki/templates/local.protected.php.j2 b/dokuwiki/templates/local.protected.php.j2
index 20067a6c1aa3a9418d9c20ef06d2d87bfa3abc41..c86bce04dc96818b19692ac266b1fa77a8ecce6b 100644
--- a/dokuwiki/templates/local.protected.php.j2
+++ b/dokuwiki/templates/local.protected.php.j2
@@ -13,9 +13,11 @@ $conf['plugin']['authad']['update_mail'] = 0;
 $conf['disableactions'] = 'register,profile_delete,resendpwd';
 $conf['superuser'] = '{{ item.ad_superuser }}';
 $conf['manager'] = '{{ item.ad_manager }}';
+$conf['passcrypt'] = 'ssha';
+{% else %}
+$conf['passcrypt'] = 'bcrypt';
 {% endif %}
 
-$conf['passcrypt'] = 'ssha';
 $conf['mailfrom'] = '{{ item.mail }}';
 $conf['htmlmail'] = 0;
 $conf['userewrite'] = '1';
@@ -24,3 +26,7 @@ $conf['xsendfile'] = 0;
 $conf['updatecheck'] = 0;
 $conf['useacl'] = 1;
 $conf['phpok'] = 0;
+{% if item.mail_host is defined %}
+$conf['plugin']['smtp']['smtp_host'] = '{{item.mail_host}}';
+$conf['plugin']['smtp']['smtp_ssl'] = 'tls';
+{% endif %}