Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
piks3l
Respect My Net
Commits
6aaca339
Commit
6aaca339
authored
Oct 21, 2012
by
stef
Browse files
[fix] correct body in sendverifymail
parent
7c7a77c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
6aaca339
...
...
@@ -128,12 +128,12 @@ def confirm(request, id, name=None):
messages
.
add_message
(
request
,
messages
.
INFO
,
unicode
(
_
(
'Thank you for verifying your confirmation'
)))
return
HttpResponseRedirect
(
'/'
)
# Redirect after POST
def
sendverifymail
(
service
,
to
,
msg
):
def
sendverifymail
(
service
,
to
,
body
):
actid
=
hashlib
.
sha1
(
''
.
join
([
chr
(
randint
(
32
,
122
))
for
x
in
range
(
12
)])).
hexdigest
()
msg
=
{
'from'
:
'nnmon@respectmynet.eu'
,
'to'
:
[
to
.
encode
(
"Utf-8"
)],
'subject'
:
_
(
'NNMon submission verification'
).
encode
(
"Utf-8"
),
'body'
:
msg
%
(
settings
.
ROOT_URL
or
'http://localhost:8001/'
,
service
,
actid
),
'body'
:
body
%
(
settings
.
ROOT_URL
or
'http://localhost:8001/'
,
service
,
actid
),
}
send_mail
(
msg
[
'subject'
],
msg
[
'body'
],
msg
[
'from'
],
msg
[
'to'
],
fail_silently
=
False
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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