Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | <div class="crm-block crm-form-block crm-smtp-form-block"> | |
beac1417 MW |
11 | <div> |
12 | <h3>{ts}General{/ts}</h3> | |
6a488035 | 13 | <table class="form-layout-compressed"> |
beac1417 MW |
14 | <tr class="crm-smtp-form-block-allow_mail_from_logged_in_contact"> |
15 | <td class="label">{$form.allow_mail_from_logged_in_contact.html}</td> | |
16 | <td>{$form.allow_mail_from_logged_in_contact.label} {help id=allow_mail_contact_email}</td> | |
17 | </tr> | |
18 | </table> | |
19 | </div> | |
20 | {crmRegion name="smtp-mailer-config"} | |
21 | <div class="crm-smtp-mailer-form-block"> | |
22 | <h3>{ts}Mailer Configuration{/ts}</h3> | |
23 | <div class="help"> | |
24 | <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> | |
25 | <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> | |
26 | <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> | |
27 | </div> | |
28 | <table> | |
6a488035 TO |
29 | <tr class="crm-smtp-form-block-outBound_option"> |
30 | <td class="label">{$form.outBound_option.label}</td> | |
31 | <td>{$form.outBound_option.html}</td> | |
32 | </tr> | |
33 | </table> | |
34 | <div id="bySMTP" class="mailoption"> | |
35 | <fieldset> | |
36 | <legend>{ts}SMTP Configuration{/ts}</legend> | |
37 | <table class="form-layout-compressed"> | |
38 | <tr class="crm-smtp-form-block-smtpServer"> | |
39 | <td class="label">{$form.smtpServer.label}</td> | |
40 | <td>{$form.smtpServer.html}<br /> | |
d112cfe8 | 41 | <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 |
42 | </td> |
43 | </tr> | |
44 | <tr class="crm-smtp-form-block-smtpPort"> | |
45 | <td class="label">{$form.smtpPort.label}</td> | |
46 | <td>{$form.smtpPort.html}<br /> | |
d112cfe8 | 47 | <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 |
48 | </td> |
49 | </tr> | |
50 | <tr class="crm-smtp-form-block-smtpAuth"> | |
51 | <td class="label">{$form.smtpAuth.label}</td> | |
52 | <td>{$form.smtpAuth.html}<br /> | |
53 | <span class="description">{ts}Does your SMTP server require authentication (user name + password)?{/ts}</span> | |
54 | </td> | |
55 | </tr> | |
edc51caa | 56 | <tr class="crm-smtp-form-block-smtpUsername"> |
6a488035 TO |
57 | <td class="label">{$form.smtpUsername.label}</td> |
58 | <td>{$form.smtpUsername.html}</td> | |
59 | </tr> | |
edc51caa | 60 | <tr class="crm-smtp-form-block-smtpPassword"> |
6a488035 | 61 | <td class="label">{$form.smtpPassword.label}</td> |
edc51caa | 62 | <td>{$form.smtpPassword.html}<br /> |
6a488035 TO |
63 | <span class="description">{ts}If your SMTP server requires authentication, enter your Username and Password here.{/ts}</span> |
64 | </td> | |
65 | </tr> | |
66 | </table> | |
67 | </fieldset> | |
68 | </div> | |
69 | <div id="bySendmail" class="mailoption"> | |
70 | <fieldset> | |
71 | <legend>{ts}Sendmail Configuration{/ts}</legend> | |
72 | <table class="form-layout-compressed"> | |
edc51caa | 73 | <tr class="crm-smtp-form-block-sendmail_path"> |
6a488035 TO |
74 | <td class="label">{$form.sendmail_path.label}</td> |
75 | <td>{$form.sendmail_path.html}<br /> | |
76 | <span class="description">{ts}Enter the Sendmail Path. EXAMPLE: /usr/sbin/sendmail{/ts}</span> | |
77 | </td> | |
78 | </tr> | |
edc51caa | 79 | <tr class="crm-smtp-form-block-sendmail_args"> |
6a488035 TO |
80 | <td class="label">{$form.sendmail_args.label}</td> |
81 | <td>{$form.sendmail_args.html}</td> | |
82 | </tr> | |
83 | </table> | |
84 | </fieldset> | |
85 | </div> | |
86 | <div class="spacer"></div> | |
87 | <div class="crm-submit-buttons"> | |
88 | {include file="CRM/common/formButtons.tpl"} | |
6a488035 | 89 | </div> |
6a488035 TO |
90 | |
91 | {literal} | |
92 | <script type="text/javascript"> | |
3cc60a06 | 93 | CRM.$(function($) { |
ae8f569f | 94 | var mailSetting = $("input[name='outBound_option']:checked").val( ); |
32c8492f | 95 | |
5402bfb8 | 96 | 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 | 97 | |
ae8f569f | 98 | showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ; |
edc51caa | 99 | |
6a488035 TO |
100 | function showHideMailOptions( value ) { |
101 | switch( value ) { | |
102 | case "0": | |
ae8f569f CW |
103 | $("#bySMTP").show( ); |
104 | $("#bySendmail").hide( ); | |
aeb97cc1 | 105 | $("#_qf_Smtp_refresh_test").prop('disabled', false); |
18150396 E |
106 | if (mailSetting == '5') { |
107 | alert(archiveWarning); | |
108 | } | |
6a488035 TO |
109 | break; |
110 | case "1": | |
ae8f569f CW |
111 | $("#bySMTP").hide( ); |
112 | $("#bySendmail").show( ); | |
aeb97cc1 | 113 | $("#_qf_Smtp_refresh_test").prop('disabled', false); |
18150396 E |
114 | if (mailSetting == '5') { |
115 | alert(archiveWarning); | |
116 | } | |
6a488035 TO |
117 | break; |
118 | case "3": | |
ae8f569f | 119 | $('.mailoption').hide(); |
aeb97cc1 | 120 | $("#_qf_Smtp_refresh_test").prop('disabled', false); |
18150396 E |
121 | if (mailSetting == '5') { |
122 | alert(archiveWarning); | |
123 | } | |
6a488035 TO |
124 | break; |
125 | default: | |
ae8f569f CW |
126 | $("#bySMTP").hide( ); |
127 | $("#bySendmail").hide( ); | |
aeb97cc1 | 128 | $("#_qf_Smtp_refresh_test").prop('disabled', true); |
6a488035 TO |
129 | } |
130 | } | |
edc51caa | 131 | |
ae8f569f CW |
132 | $("input[name='outBound_option']").click( function( ) { |
133 | showHideMailOptions( $(this).val( ) ); | |
6a488035 TO |
134 | }); |
135 | }); | |
edc51caa | 136 | |
6a488035 TO |
137 | </script> |
138 | {/literal} | |
beac1417 MW |
139 | </div> |
140 | {/crmRegion} | |
141 | </div> |