Skip to content

Commit

Permalink
Kill php mail from settings
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Jul 4, 2018
1 parent 65bcef8 commit 0dd4a3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 3 additions & 8 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,24 +328,19 @@
'mail_smtpdebug' => false,

/**
* Which mode to use for sending mail: ``sendmail``, ``smtp``, ``qmail`` or
* ``php``.
* Which mode to use for sending mail: ``sendmail``, ``smtp`` or ``qmail``.
*
* If you are using local or remote SMTP, set this to ``smtp``.
*
* If you are using PHP mail you must have an installed and working email system
* on the server. The program used to send email is defined in the ``php.ini``
* file.
*
* For the ``sendmail`` option you need an installed and working email system on
* the server, with ``/usr/sbin/sendmail`` installed on your Unix system.
*
* For ``qmail`` the binary is /var/qmail/bin/sendmail, and it must be installed
* on your Unix system.
*
* Defaults to ``php``
* Defaults to ``smtp``
*/
'mail_smtpmode' => 'php',
'mail_smtpmode' => 'smtp',

/**
* This depends on ``mail_smtpmode``. Specify the IP address of your mail
Expand Down
4 changes: 4 additions & 0 deletions lib/private/Settings/Admin/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function getForm() {
$parameters['mail_smtppassword'] = '********';
}

if ($parameters['mail_smtpmode'] === '' || $parameters['mail_smtpmode'] === 'php') {
$parameters['mail_smtpmode'] = 'smtp';
}

return new TemplateResponse('settings', 'settings/admin/additional-mail', $parameters, '');
}

Expand Down
1 change: 0 additions & 1 deletion settings/templates/settings/admin/additional-mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
];

$mail_smtpmode = [
['php', 'PHP'],
['smtp', 'SMTP'],
];
if ($_['sendmail_is_available']) {
Expand Down

0 comments on commit 0dd4a3e

Please sign in to comment.