Parameter from_email to send_mail() should be string - #3417
Conversation
|
See: https://docs.djangoproject.com/en/1.4/topics/email/#send-mail I have verified this on sandbox. @flowerhack Also should we revert this? https://github.com/edx/edx-platform/pull/3265 |
|
👍 |
|
Could we get a unit test added to shoppingcart/tests/test_models.py for this change? Also, if it's not too much trouble, I'd really love to fix logging in this PR as well. Currently we log if an email raises a SMTPException or a BotoServerError. Maybe we should also log for whatever error went uncaught in this case / maybe just have a broad except that logs if there's any kind of problem with the send mail call? Thanks for fixing this up! |
There was a problem hiding this comment.
This will result in logs like:
2014-05-02 11:16:32,719 ERROR 11860 [shoppingcart] models.py:57 - Failed sending email to billing request a refund for verified certiciate (User student, Course edx/math101/2014, CourseEnrollmentID 509, Order #136)
BotoServerError: 403 Forbidden
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidClientTokenId</Code>
<Message>The security token included in the request is invalid</Message>
</Error>
<RequestId>bcd087b1-d20c-11e3-88cf-4b4f31b54ed5</RequestId>
</ErrorResponse>
|
Looks great! 👍 , ship it, etc Thanks for this. |
Parameter from_email to send_mail() should be string
No description provided.