Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
0667067c
Commit
0667067c
authored
Oct 13, 2015
by
严泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
捕获添加用户邮箱填写错误时邮件发送失败的异常
parent
949065be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
views.py
juser/views.py
+5
-2
No files found.
juser/views.py
View file @
0667067c
...
...
@@ -663,8 +663,11 @@ def user_add(request):
except
Exception
:
pass
else
:
send_mail
(
mail_title
,
mail_msg
,
MAIL_FROM
,
[
email
],
fail_silently
=
False
)
msg
=
u'添加用户
%
s 成功! 用户密码已发送到
%
s 邮箱!'
%
(
username
,
email
)
try
:
send_mail
(
mail_title
,
mail_msg
,
MAIL_FROM
,
[
email
],
fail_silently
=
False
)
msg
=
u'添加用户
%
s 成功! 用户密码已发送到
%
s 邮箱!'
%
(
username
,
email
)
except
:
msg
=
u'添加用户
%
s 成功! 用户密码发送失败,请检查邮箱是否正确!'
%
username
return
render_to_response
(
'juser/user_add.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
...
...
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