2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2020 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 <div class="crm-block crm-form-block crm-smtp-form-block">
28 <h3>{ts}General{/ts}</h3>
29 <table class="form-layout-compressed">
30 <tr class="crm-smtp-form-block-allow_mail_from_logged_in_contact">
31 <td class="label">{$form.allow_mail_from_logged_in_contact.html}</td>
32 <td>{$form.allow_mail_from_logged_in_contact.label} {help id=allow_mail_contact_email}</td>
36 {crmRegion name="smtp-mailer-config"}
37 <div class="crm-smtp-mailer-form-block">
38 <h3>{ts}Mailer Configuration{/ts}</h3>
40 <p>{ts}CiviCRM offers several options to send emails. 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>
41 <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>
42 <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>
45 <tr class="crm-smtp-form-block-outBound_option">
46 <td class="label">{$form.outBound_option.label}</td>
47 <td>{$form.outBound_option.html}</td>
50 <div id="bySMTP" class="mailoption">
52 <legend>{ts}SMTP Configuration{/ts}</legend>
53 <table class="form-layout-compressed">
54 <tr class="crm-smtp-form-block-smtpServer">
55 <td class="label">{$form.smtpServer.label}</td>
56 <td>{$form.smtpServer.html}<br />
57 <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>
60 <tr class="crm-smtp-form-block-smtpPort">
61 <td class="label">{$form.smtpPort.label}</td>
62 <td>{$form.smtpPort.html}<br />
63 <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>
66 <tr class="crm-smtp-form-block-smtpAuth">
67 <td class="label">{$form.smtpAuth.label}</td>
68 <td>{$form.smtpAuth.html}<br />
69 <span class="description">{ts}Does your SMTP server require authentication (user name + password)?{/ts}</span>
72 <tr class="crm-smtp-form-block-smtpUsername">
73 <td class="label">{$form.smtpUsername.label}</td>
74 <td>{$form.smtpUsername.html}</td>
76 <tr class="crm-smtp-form-block-smtpPassword">
77 <td class="label">{$form.smtpPassword.label}</td>
78 <td>{$form.smtpPassword.html}<br />
79 <span class="description">{ts}If your SMTP server requires authentication, enter your Username and Password here.{/ts}</span>
85 <div id="bySendmail" class="mailoption">
87 <legend>{ts}Sendmail Configuration{/ts}</legend>
88 <table class="form-layout-compressed">
89 <tr class="crm-smtp-form-block-sendmail_path">
90 <td class="label">{$form.sendmail_path.label}</td>
91 <td>{$form.sendmail_path.html}<br />
92 <span class="description">{ts}Enter the Sendmail Path. EXAMPLE: /usr/sbin/sendmail{/ts}</span>
95 <tr class="crm-smtp-form-block-sendmail_args">
96 <td class="label">{$form.sendmail_args.label}</td>
97 <td>{$form.sendmail_args.html}</td>
102 <div class="spacer"></div>
103 <div class="crm-submit-buttons">
104 {include file="CRM/common/formButtons.tpl"}
108 <script type="text/javascript">
110 var mailSetting = $("input[name='outBound_option']:checked").val( );
112 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}"
114 showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ;
116 function showHideMailOptions( value ) {
119 $("#bySMTP").show( );
120 $("#bySendmail").hide( );
121 $("#_qf_Smtp_refresh_test").prop('disabled', false);
122 if (mailSetting == '5') {
123 alert(archiveWarning);
127 $("#bySMTP").hide( );
128 $("#bySendmail").show( );
129 $("#_qf_Smtp_refresh_test").prop('disabled', false);
130 if (mailSetting == '5') {
131 alert(archiveWarning);
135 $('.mailoption').hide();
136 $("#_qf_Smtp_refresh_test").prop('disabled', false);
137 if (mailSetting == '5') {
138 alert(archiveWarning);
142 $("#bySMTP").hide( );
143 $("#bySendmail").hide( );
144 $("#_qf_Smtp_refresh_test").prop('disabled', true);
148 $("input[name='outBound_option']").click( function( ) {
149 showHideMailOptions( $(this).val( ) );