]> source.dussan.org Git - gitea.git/commitdiff
Show Sendmail settings on admin config page (#2782)
authorJonas Bröms <cez81@users.noreply.github.com>
Thu, 26 Oct 2017 08:47:16 +0000 (10:47 +0200)
committerLunny Xiao <xiaolunwen@gmail.com>
Thu, 26 Oct 2017 08:47:16 +0000 (16:47 +0800)
* Show Sendmail settings on admin config page

* Remove unecessary if statement

options/locale/locale_en-US.ini
templates/admin/config.tmpl

index 686e353ea1efe43276791b7ed9ab5e0407df5323..6fa33e97c0242c067e8e2c2257ac68da45eb24ae 100644 (file)
@@ -1412,6 +1412,9 @@ config.mailer_disable_helo = Disable HELO
 config.mailer_name = Name
 config.mailer_host = Host
 config.mailer_user = User
+config.mailer_use_sendmail = Use Sendmail
+config.mailer_sendmail_path = Sendmail Path
+config.mailer_sendmail_args = Extra arguments to Sendmail
 config.send_test_mail = Send Test Email
 config.test_mail_failed = Failed to send test email to '%s': %v
 config.test_mail_sent = Test email has been sent to '%s'.
index b57b1847f68ce607e487c34ac5dbce1e30a68b27..3af0c870c3d87a4de12200d6c2b2e3d1393ee62b 100644 (file)
                                {{if .MailerEnabled}}
                                        <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
                                        <dd>{{.Mailer.Name}}</dd>
-                                       <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
-                                       <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
-                                       <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
-                                       <dd>{{.Mailer.Host}}</dd>
+                                       {{if not .Mailer.UseSendmail}}
+                                               <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
+                                               <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
+                                               <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
+                                               <dd>{{.Mailer.Host}}</dd>
+                                       {{else}}
+                                               <dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt>
+                                               <dd><i class="fa fa-check-square-o"></i></dd>
+                                               <dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt>
+                                               <dd>{{.Mailer.SendmailPath}}</dd>
+                                               <dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt>
+                                               <dd>{{.Mailer.SendmailArgs}}</dd>
+                                       {{end}}
                                        <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
                                        <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
                                        <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">