Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
3d7f4c7c
Commit
3d7f4c7c
authored
Sep 12, 2016
by
Marcus von Appen
Committed by
Gervase Markham
Sep 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1070122 - add option to send test email to Params page
parent
a43b2bbd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
0 deletions
+45
-0
editparams.cgi
editparams.cgi
+14
-0
editparams.html.tmpl
template/en/default/admin/params/editparams.html.tmpl
+3
-0
mta-test.txt.tmpl
template/en/default/email/mta-test.txt.tmpl
+18
-0
messages.html.tmpl
template/en/default/global/messages.html.tmpl
+10
-0
No files found.
editparams.cgi
View file @
3d7f4c7c
...
@@ -147,6 +147,20 @@ if ($action eq 'save' && $current_module) {
...
@@ -147,6 +147,20 @@ if ($action eq 'save' && $current_module) {
delete_token
(
$token
);
delete_token
(
$token
);
}
}
if
(
$cgi
->
param
(
'save-and-test-mta-params'
)
&&
$cgi
->
request_method
()
eq
"POST"
)
{
my
$message
;
my
$mail_template
=
Bugzilla
->
template_inner
(
$user
->
setting
(
'lang'
));
$mail_template
->
process
(
'email/mta-test.txt.tmpl'
,
undef
,
\
$message
);
require
Bugzilla::
Mailer
;
# This will throw all sorts of useful errors if mail is not working
Bugzilla::Mailer::
MessageToMTA
(
$message
);
$vars
->
{
'message'
}
=
'mta_param_tests_run'
;
}
$vars
->
{
'token'
}
=
issue_session_token
(
'edit_parameters'
);
$vars
->
{
'token'
}
=
issue_session_token
(
'edit_parameters'
);
$template
->
process
(
"admin/params/editparams.html.tmpl"
,
$vars
)
$template
->
process
(
"admin/params/editparams.html.tmpl"
,
$vars
)
...
...
template/en/default/admin/params/editparams.html.tmpl
View file @
3d7f4c7c
...
@@ -93,6 +93,9 @@
...
@@ -93,6 +93,9 @@
<input type="hidden" name="action" value="save">
<input type="hidden" name="action" value="save">
<input type="hidden" name="token" value="[% token FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
<input type="submit" id="save-params" value="Save Changes">
<input type="submit" id="save-params" value="Save Changes">
[% IF panel.name == "mta" %]
<input type="submit" id="save-and-test-mta-params" name="save-and-test-mta-params" value="Save Changes And Send Test Email">
[% END %]
</form>
</form>
[% END %]
[% END %]
</div>
</div>
...
...
template/en/default/email/mta-test.txt.tmpl
0 → 100644
View file @
3d7f4c7c
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
Content-Type: text/plain
From: [% Param('mailfrom') %]
To: [% user.email %]
Subject: [% terms.Bugzilla %] Email System Test Message
X-Bugzilla-Type: admin
Dear [% terms.Bugzilla %] administrator,
This is a test email from your [% terms.Bugzilla %] system. If you can
read this, your [% terms.Bugzilla %] can send email.
template/en/default/global/messages.html.tmpl
View file @
3d7f4c7c
...
@@ -544,6 +544,16 @@
...
@@ -544,6 +544,16 @@
No changes made to milestone <em>[% milestone.name FILTER html %]</em>.
No changes made to milestone <em>[% milestone.name FILTER html %]</em>.
[% END %]
[% END %]
[% ELSIF message_tag == "mta_param_tests_run" %]
[% title = "Parameters Updated And Test Email Sent" %]
[% IF param_changed.size > 0 %]
[% FOREACH param = param_changed %]
Changed <em>[% param FILTER html %]</em>.<br>
[% END %]
<br>
[% END %]
Test mail sent to [% user.email %].
[% ELSIF message_tag == "parameters_updated" %]
[% ELSIF message_tag == "parameters_updated" %]
[% title = "Parameters Updated" %]
[% title = "Parameters Updated" %]
[% IF param_changed.size > 0 %]
[% IF param_changed.size > 0 %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment