CRM-15789 - Button cleanup
[civicrm-core.git] / templates / CRM / Admin / Form / Setting / Smtp.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
39de6fd5 3 | CiviCRM version 4.6 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
26<div class="crm-block crm-form-block crm-smtp-form-block">
27<div id="help">
0865a4ed
CW
28 <p>{ts}CiviCRM offers several options to send emails. The default option should work fine on linux systems. If you are using windows, you probably need to enter settings for your SMTP/Sendmail server. You can send a test email to check your settings by clicking "Save and Send Test Email". If you're unsure of the correct values, check with your system administrator, ISP or hosting provider.{/ts}</p>
29 <p>{ts}If you do not want users to send outbound mail from CiviCRM, select "Disable Outbound Email". NOTE: If you disable outbound email, and you are using Online Contribution pages or online Event Registration - you will need to disable automated receipts and registration confirmations.{/ts}</p>
30 <p>{ts}If you choose Redirect to Database, all emails will be recorded as archived mailings instead of being sent out. They can be found in the civicrm_mailing_spool table in the CiviCRM database.{/ts}</p>
303ef4fd 31
6a488035
TO
32</div>
33 <table class="form-layout-compressed">
34 <tr class="crm-smtp-form-block-outBound_option">
35 <td class="label">{$form.outBound_option.label}</td>
36 <td>{$form.outBound_option.html}</td>
37 </tr>
38 </table>
39 <div id="bySMTP" class="mailoption">
40 <fieldset>
41 <legend>{ts}SMTP Configuration{/ts}</legend>
42 <table class="form-layout-compressed">
43 <tr class="crm-smtp-form-block-smtpServer">
44 <td class="label">{$form.smtpServer.label}</td>
45 <td>{$form.smtpServer.html}<br />
d112cfe8 46 <span class="description">{ts}Enter the SMTP server (machine) name, such as "smtp.example.com". If the server uses SSL, add "ssl://" to the beginning of the server name, such as "ssl://smtp.example.com".{/ts}</span>
6a488035
TO
47 </td>
48 </tr>
49 <tr class="crm-smtp-form-block-smtpPort">
50 <td class="label">{$form.smtpPort.label}</td>
51 <td>{$form.smtpPort.html}<br />
d112cfe8 52 <span class="description">{ts}The most common SMTP port possibilities are 25, 465, and 587. Check with your mail provider for the appropriate one.{/ts}</span>
6a488035
TO
53 </td>
54 </tr>
55 <tr class="crm-smtp-form-block-smtpAuth">
56 <td class="label">{$form.smtpAuth.label}</td>
57 <td>{$form.smtpAuth.html}<br />
58 <span class="description">{ts}Does your SMTP server require authentication (user name + password)?{/ts}</span>
59 </td>
60 </tr>
edc51caa 61 <tr class="crm-smtp-form-block-smtpUsername">
6a488035
TO
62 <td class="label">{$form.smtpUsername.label}</td>
63 <td>{$form.smtpUsername.html}</td>
64 </tr>
edc51caa 65 <tr class="crm-smtp-form-block-smtpPassword">
6a488035 66 <td class="label">{$form.smtpPassword.label}</td>
edc51caa 67 <td>{$form.smtpPassword.html}<br />
6a488035
TO
68 <span class="description">{ts}If your SMTP server requires authentication, enter your Username and Password here.{/ts}</span>
69 </td>
70 </tr>
71 </table>
72 </fieldset>
73 </div>
74 <div id="bySendmail" class="mailoption">
75 <fieldset>
76 <legend>{ts}Sendmail Configuration{/ts}</legend>
77 <table class="form-layout-compressed">
edc51caa 78 <tr class="crm-smtp-form-block-sendmail_path">
6a488035
TO
79 <td class="label">{$form.sendmail_path.label}</td>
80 <td>{$form.sendmail_path.html}<br />
81 <span class="description">{ts}Enter the Sendmail Path. EXAMPLE: /usr/sbin/sendmail{/ts}</span>
82 </td>
83 </tr>
edc51caa 84 <tr class="crm-smtp-form-block-sendmail_args">
6a488035
TO
85 <td class="label">{$form.sendmail_args.label}</td>
86 <td>{$form.sendmail_args.html}</td>
87 </tr>
88 </table>
89 </fieldset>
90 </div>
91 <div class="spacer"></div>
92 <div class="crm-submit-buttons">
93 {include file="CRM/common/formButtons.tpl"}
6a488035 94 </div>
edc51caa 95</div>
6a488035
TO
96
97{literal}
98<script type="text/javascript">
3cc60a06 99 CRM.$(function($) {
ae8f569f 100 var mailSetting = $("input[name='outBound_option']:checked").val( );
32c8492f 101
18150396 102 var archiveWarning = "{/literal}{ts escape='js'}WARNING: You are switching from a testing mode (Redirect to Database) to a live mode. Check Mailings > Archived Mailings, and delete any test mailings that are not in Completed status prior to running the mailing cron job for the first time. This will ensure that test mailings are not actually sent out.{/ts}{literal}"
32c8492f 103
ae8f569f 104 showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ;
edc51caa 105
6a488035
TO
106 function showHideMailOptions( value ) {
107 switch( value ) {
108 case "0":
ae8f569f
CW
109 $("#bySMTP").show( );
110 $("#bySendmail").hide( );
aeb97cc1 111 $("#_qf_Smtp_refresh_test").prop('disabled', false);
18150396
E
112 if (mailSetting == '5') {
113 alert(archiveWarning);
114 }
6a488035
TO
115 break;
116 case "1":
ae8f569f
CW
117 $("#bySMTP").hide( );
118 $("#bySendmail").show( );
aeb97cc1 119 $("#_qf_Smtp_refresh_test").prop('disabled', false);
18150396
E
120 if (mailSetting == '5') {
121 alert(archiveWarning);
122 }
6a488035
TO
123 break;
124 case "3":
ae8f569f 125 $('.mailoption').hide();
aeb97cc1 126 $("#_qf_Smtp_refresh_test").prop('disabled', false);
18150396
E
127 if (mailSetting == '5') {
128 alert(archiveWarning);
129 }
6a488035
TO
130 break;
131 default:
ae8f569f
CW
132 $("#bySMTP").hide( );
133 $("#bySendmail").hide( );
aeb97cc1 134 $("#_qf_Smtp_refresh_test").prop('disabled', true);
6a488035
TO
135 }
136 }
edc51caa 137
ae8f569f
CW
138 $("input[name='outBound_option']").click( function( ) {
139 showHideMailOptions( $(this).val( ) );
6a488035
TO
140 });
141 });
edc51caa 142
6a488035
TO
143</script>
144{/literal}