Clean up the e-mail settings.

This commit is contained in:
Diana Huang
2014-01-10 10:54:10 -05:00
parent a3f1f6600d
commit f37001275a
3 changed files with 5 additions and 5 deletions

View File

@@ -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,))

View File

@@ -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 <team@test.foo>')
self.assertEqual(mail.outbox[0].from_email, settings.DEFAULT_FROM_EMAIL)
self.assertEqual(
mail.outbox[0].to, ['Fred Flintstone <fred@bedrock.gov>'])
self.assertEqual(

View File

@@ -643,7 +643,7 @@
<br>
## 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>
</tr>
</tbody></table>