diff --git a/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py b/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py index e6e8571d9b..f36c9ea704 100644 --- a/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py +++ b/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py @@ -89,7 +89,7 @@ class Command(BaseCommand): 'gf' if grandfather else 'T']) query = [ ('pfCertificationName', certificate.name), - ('pfAuthorityName', self.api.config['COMPANY_NAME']), + ('pfAuthorityName', settings.PLATFORM_NAME), ('pfAuthorityId', self.api.config['COMPANY_ID']), ('pfCertificationUrl', certificate.download_url), ('pfLicenseNo', certificate.course_id), @@ -152,6 +152,6 @@ class Command(BaseCommand): """ Send an email. """ - fromaddr = self.api.config['EMAIL_FROM'] + fromaddr = settings.DEFAULT_FROM_EMAIL toaddr = '%s <%s>' % (user.profile.name, user.email) send_mail(subject, body, fromaddr, (toaddr,)) diff --git a/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py b/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py index f766162f0a..d1ada3663e 100644 --- a/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py +++ b/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py @@ -16,7 +16,7 @@ from django.test import TestCase from xmodule.modulestore.tests.factories import CourseFactory from student.models import UserProfile 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 MODULE = 'linkedin.management.commands.linkedin_mailusers.' @@ -80,7 +80,7 @@ class MailusersTests(TestCase): self.assertEqual( json.loads(self.barney.linkedin.emailed_courses), ['TESTX/3/TEST3']) self.assertEqual(len(mail.outbox), 3) - self.assertEqual(mail.outbox[0].from_email, 'The Team ') + self.assertEqual(mail.outbox[0].from_email, settings.DEFAULT_FROM_EMAIL) self.assertEqual( mail.outbox[0].to, ['Fred Flintstone ']) self.assertEqual( diff --git a/lms/templates/linkedin/linkedin_email.html b/lms/templates/linkedin/linkedin_email.html index 22b0f799e9..b5bf140a94 100644 --- a/lms/templates/linkedin/linkedin_email.html +++ b/lms/templates/linkedin/linkedin_email.html @@ -643,7 +643,7 @@
## TODO put path/to/real/source/file here -
+