Merge branch 4.5 into master
[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"}
94 <span class="place-left">&nbsp;</span>
95 <span class="crm-button crm-button-type-next crm-button_qf_Smtp_refresh_test">{$form._qf_Smtp_refresh_test.html}</span>
96 </div>
edc51caa 97</div>
6a488035
TO
98
99{literal}
100<script type="text/javascript">
3cc60a06 101 CRM.$(function($) {
ae8f569f 102 var mailSetting = $("input[name='outBound_option']:checked").val( );
32c8492f 103
18150396 104 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 105
ae8f569f 106 showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ;
edc51caa 107
6a488035
TO
108 function showHideMailOptions( value ) {
109 switch( value ) {
110 case "0":
ae8f569f
CW
111 $("#bySMTP").show( );
112 $("#bySendmail").hide( );
113 $("#_qf_Smtp_refresh_test").show( );
18150396
E
114 if (mailSetting == '5') {
115 alert(archiveWarning);
116 }
6a488035
TO
117 break;
118 case "1":
ae8f569f
CW
119 $("#bySMTP").hide( );
120 $("#bySendmail").show( );
121 $("#_qf_Smtp_refresh_test").show( );
18150396
E
122 if (mailSetting == '5') {
123 alert(archiveWarning);
124 }
6a488035
TO
125 break;
126 case "3":
ae8f569f
CW
127 $('.mailoption').hide();
128 $("#_qf_Smtp_refresh_test").show( );
18150396
E
129 if (mailSetting == '5') {
130 alert(archiveWarning);
131 }
6a488035
TO
132 break;
133 default:
ae8f569f
CW
134 $("#bySMTP").hide( );
135 $("#bySendmail").hide( );
136 $("#_qf_Smtp_refresh_test").hide( );
6a488035
TO
137 }
138 }
edc51caa 139
ae8f569f
CW
140 $("input[name='outBound_option']").click( function( ) {
141 showHideMailOptions( $(this).val( ) );
6a488035
TO
142 });
143 });
edc51caa 144
6a488035
TO
145</script>
146{/literal}