diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-05 14:53:20 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-05 14:53:20 +0100 |
commit | 0285d5b6e27302378fff18cfc2e4f3ef0c0ce5eb (patch) | |
tree | 49b1ca14186b5d85d82498e5d06ec6eb5d72be0f /settings | |
parent | 36d7c0b6a7ed79ec1c578476a797648715b3b000 (diff) | |
download | nextcloud-server-0285d5b6e27302378fff18cfc2e4f3ef0c0ce5eb.tar.gz nextcloud-server-0285d5b6e27302378fff18cfc2e4f3ef0c0ce5eb.zip |
Hide QMail when not selected and hide sendmail when not available on the server
Fix #7559
Diffstat (limited to 'settings')
-rwxr-xr-x | settings/admin.php | 5 | ||||
-rw-r--r-- | settings/templates/admin.php | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/settings/admin.php b/settings/admin.php index 42477bfc1ca..47028a701db 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -20,6 +20,11 @@ $htaccessworking=OC_Util::isHtAccessWorking(); $entries=OC_Log_Owncloud::getEntries(3); $entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 3; +// Should we display sendmail as an option? +if (ini_get('sendmail_path') || file_exists('/usr/sbin/sendmail') || file_exists('/var/qmail/bin/sendmail')) { + $tmpl->assign('sendmail_is_available', true); +} + $tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 )); $tmpl->assign('mail_domain', OC_Config::getValue( "mail_domain", '' )); $tmpl->assign('mail_from_address', OC_Config::getValue( "mail_from_address", '' )); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 487da036e74..9f5f9f54ba3 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -26,11 +26,15 @@ $mail_smtpsecure = array( ); $mail_smtpmode = array( - 'sendmail', - 'smtp', - 'qmail', 'php', + 'smtp', ); +if ($_['sendmail_is_available']) { + $mail_smtpmode[] = 'sendmail'; +} +if ($_['mail_smtpmode'] == 'qmail') { + $mail_smtpmode[] = 'qmail'; +} ?> |