Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
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
edx
edx-platform
Commits
200394f6
Commit
200394f6
authored
Jun 04, 2014
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added logging for sender email address on BotoServerError.
LMS-2734
parent
7beaf4ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
common/djangoapps/student/views.py
+9
-3
No files found.
common/djangoapps/student/views.py
View file @
200394f6
...
...
@@ -1260,7 +1260,7 @@ def create_account(request, post_override=None): # pylint: disable-msg=too-many
else
:
user
.
email_user
(
subject
,
message
,
from_address
)
except
Exception
:
# pylint: disable=broad-except
log
.
warning
(
'Unable to send activation email to user'
,
exc_info
=
True
)
log
.
error
(
'Unable to send activation email to user from "{from_address}"'
.
format
(
from_address
=
from_address
)
,
exc_info
=
True
)
js
[
'value'
]
=
_
(
'Could not send activation e-mail.'
)
# What is the correct status code to use here? I think it's 500, because
# the problem is on the server's end -- but also, the account was created.
...
...
@@ -1584,7 +1584,7 @@ def reactivation_email_for_user(user):
try
:
user
.
email_user
(
subject
,
message
,
settings
.
DEFAULT_FROM_EMAIL
)
except
Exception
:
# pylint: disable=broad-except
log
.
warning
(
'Unable to send reactivation email'
,
exc_info
=
True
)
log
.
error
(
'Unable to send reactivation email from "{from_address}"'
.
format
(
from_address
=
settings
.
DEFAULT_FROM_EMAIL
)
,
exc_info
=
True
)
return
JsonResponse
({
"success"
:
False
,
"error"
:
_
(
'Unable to send reactivation email'
)
...
...
@@ -1658,8 +1658,14 @@ def change_email_request(request):
'email_from_address'
,
settings
.
DEFAULT_FROM_EMAIL
)
try
:
send_mail
(
subject
,
message
,
from_address
,
[
pec
.
new_email
])
except
Exception
:
# pylint: disable=broad-except
log
.
error
(
'Unable to send email activation link to user from "{from_address}"'
.
format
(
from_address
=
from_address
),
exc_info
=
True
)
return
JsonResponse
({
"success"
:
False
,
"error"
:
_
(
'Unable to send email activation link. Please try again later.'
)
})
return
JsonResponse
({
"success"
:
True
})
...
...
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