Commit 0285d5b6 authored by Joas Schilling's avatar Joas Schilling
Browse files

Hide QMail when not selected and hide sendmail when not available on the server

Fix #7559
parent 36d7c0b6
...@@ -20,6 +20,11 @@ $htaccessworking=OC_Util::isHtAccessWorking(); ...@@ -20,6 +20,11 @@ $htaccessworking=OC_Util::isHtAccessWorking();
$entries=OC_Log_Owncloud::getEntries(3); $entries=OC_Log_Owncloud::getEntries(3);
$entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 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('loglevel', OC_Config::getValue( "loglevel", 2 ));
$tmpl->assign('mail_domain', OC_Config::getValue( "mail_domain", '' )); $tmpl->assign('mail_domain', OC_Config::getValue( "mail_domain", '' ));
$tmpl->assign('mail_from_address', OC_Config::getValue( "mail_from_address", '' )); $tmpl->assign('mail_from_address', OC_Config::getValue( "mail_from_address", '' ));
......
...@@ -26,11 +26,15 @@ $mail_smtpsecure = array( ...@@ -26,11 +26,15 @@ $mail_smtpsecure = array(
); );
$mail_smtpmode = array( $mail_smtpmode = array(
'sendmail',
'smtp',
'qmail',
'php', 'php',
'smtp',
); );
if ($_['sendmail_is_available']) {
$mail_smtpmode[] = 'sendmail';
}
if ($_['mail_smtpmode'] == 'qmail') {
$mail_smtpmode[] = 'qmail';
}
?> ?>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment