diff --git a/library/config.php b/library/config.php index b586829e4..d65825adb 100644 --- a/library/config.php +++ b/library/config.php @@ -435,11 +435,11 @@ $bb_cfg['invites_system'] = [ ]; $bb_cfg['password_symbols'] = [ // What symbols should be required in the password - 'nums' => true, // Numeric - 'spec_symbols' => false, // Special symbols - 'letters' => [ // Letters - 'uppercase' => true, // Uppercase letters - 'lowercase' => true // Lowercase letters + 'nums' => true, + 'spec_symbols' => false, + 'letters' => [ + 'uppercase' => false, + 'lowercase' => true ] ]; $bb_cfg['password_hash_options'] = [ @@ -451,6 +451,7 @@ $bb_cfg['password_hash_options'] = [ // Email $bb_cfg['emailer'] = [ 'enabled' => true, + 'sendmail_command' => '/usr/sbin/sendmail -bs', 'smtp' => [ 'enabled' => false, // send email via external SMTP server 'host' => 'localhost', // SMTP server host diff --git a/src/Emailer.php b/src/Emailer.php index f1162eb36..7330f9405 100644 --- a/src/Emailer.php +++ b/src/Emailer.php @@ -100,12 +100,12 @@ class Emailer $tpl_file = LANG_ROOT_DIR . '/' . $bb_cfg['default_lang'] . '/email/' . $template_file . '.html'; if (!is_file($tpl_file)) { - bb_die('Could not find email template file: ' . $template_file); + throw new Exception('Could not find email template file: ' . $template_file); } } if (!$fd = fopen($tpl_file, 'rb')) { - bb_die('Failed opening email template file: ' . $tpl_file); + throw new Exception('Failed opening email template file: ' . $tpl_file); } $this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file)); @@ -159,7 +159,7 @@ class Emailer $transport = new EsmtpTransport('localhost', 25); } } else { - $transport = new SendmailTransport('/usr/sbin/sendmail -bs'); + $transport = new SendmailTransport($bb_cfg['emailer']['sendmail_command']); } $mailer = new Mailer($transport);