Commits

Anonymous committed d5884cf

applying fixes from daniel benamy

  • Participants
  • Parent commits 7e4b8f9

Comments (0)

Files changed (1)

emailform/views.py

 from __future__ import absolute_import
 
 import logging
+import smtplib
 
 from django.conf import settings
 from django.core.mail import EmailMultiAlternatives
 from .models import EmailForm, Entry, OPTION_TYPE_CHOICES
 
 from .util import ChoiceEnum
-from . import settings as local_settings
+from . import settings as emailform_settings
 
 
 def _get_remote_ip(request):
         edit_url = reverse("admin:%s_%s_change" % view_args, args=(obj.id,))
     except NoReverseMatch:
         edit_url = "/admin/%s/%s/%d/" % (view_args + (obj.id,))
-    admin_url = local_settings.EMAILFORM_ADMIN_SITE
+    admin_url = emailform_settings.EMAILFORM_ADMIN_SITE
     if not admin_url:
         admin_url = "http://" + request.META["HTTP_HOST"]
     elif len(admin_url) < 4 or admin_url[:4].lower() != "http":
 
 def _send_emailform_email(request, emailform, entry):
     subject = emailform.title
-    sender = local_settings.EMAILFORM_EMAIL_FROM
+    sender = emailform_settings.EMAILFORM_EMAIL_FROM
     recipients = list(set(x.strip() for x in emailform.email.split(',')))
     links = [(_url_for_edit(request, entry), "Edit Submission"),
              (_url_for_edit(request, emailform), "Edit Email Form"), ]