Commit f3700127 by Diana Huang

Clean up the e-mail settings.

parent a3f1f660
...@@ -89,7 +89,7 @@ class Command(BaseCommand): ...@@ -89,7 +89,7 @@ class Command(BaseCommand):
'gf' if grandfather else 'T']) 'gf' if grandfather else 'T'])
query = [ query = [
('pfCertificationName', certificate.name), ('pfCertificationName', certificate.name),
('pfAuthorityName', self.api.config['COMPANY_NAME']), ('pfAuthorityName', settings.PLATFORM_NAME),
('pfAuthorityId', self.api.config['COMPANY_ID']), ('pfAuthorityId', self.api.config['COMPANY_ID']),
('pfCertificationUrl', certificate.download_url), ('pfCertificationUrl', certificate.download_url),
('pfLicenseNo', certificate.course_id), ('pfLicenseNo', certificate.course_id),
...@@ -152,6 +152,6 @@ class Command(BaseCommand): ...@@ -152,6 +152,6 @@ class Command(BaseCommand):
""" """
Send an email. Send an email.
""" """
fromaddr = self.api.config['EMAIL_FROM'] fromaddr = settings.DEFAULT_FROM_EMAIL
toaddr = '%s <%s>' % (user.profile.name, user.email) toaddr = '%s <%s>' % (user.profile.name, user.email)
send_mail(subject, body, fromaddr, (toaddr,)) send_mail(subject, body, fromaddr, (toaddr,))
...@@ -16,7 +16,7 @@ from django.test import TestCase ...@@ -16,7 +16,7 @@ from django.test import TestCase
from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.factories import CourseFactory
from student.models import UserProfile from student.models import UserProfile
from linkedin.models import LinkedIn from linkedin.models import LinkedIn
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, mixed_store_config from xmodule.modulestore.tests.django_utils import mixed_store_config
from linkedin.management.commands import linkedin_mailusers as mailusers from linkedin.management.commands import linkedin_mailusers as mailusers
MODULE = 'linkedin.management.commands.linkedin_mailusers.' MODULE = 'linkedin.management.commands.linkedin_mailusers.'
...@@ -80,7 +80,7 @@ class MailusersTests(TestCase): ...@@ -80,7 +80,7 @@ class MailusersTests(TestCase):
self.assertEqual( self.assertEqual(
json.loads(self.barney.linkedin.emailed_courses), ['TESTX/3/TEST3']) json.loads(self.barney.linkedin.emailed_courses), ['TESTX/3/TEST3'])
self.assertEqual(len(mail.outbox), 3) self.assertEqual(len(mail.outbox), 3)
self.assertEqual(mail.outbox[0].from_email, 'The Team <team@test.foo>') self.assertEqual(mail.outbox[0].from_email, settings.DEFAULT_FROM_EMAIL)
self.assertEqual( self.assertEqual(
mail.outbox[0].to, ['Fred Flintstone <fred@bedrock.gov>']) mail.outbox[0].to, ['Fred Flintstone <fred@bedrock.gov>'])
self.assertEqual( self.assertEqual(
......
...@@ -643,7 +643,7 @@ ...@@ -643,7 +643,7 @@
<br> <br>
## TODO put path/to/real/source/file here ## TODO put path/to/real/source/file here
<div align="right"><a href="${linkedin_add_url}" style="font-size: 12px;word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #126f9a;font-weight: normal;text-decoration: underline;" target="_blank"><img align="none" src="file://localhost/Users/sarina/Desktop/linkedin_add_to_profile.png"></a></div> <div align="right"><a href="${linkedin_add_url}" style="font-size: 12px;word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #126f9a;font-weight: normal;text-decoration: underline;" target="_blank"><img align="none" src="/linkedin_add_to_profile.png"></a></div>
</td> </td>
</tr> </tr>
</tbody></table> </tbody></table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment