Skip to content

Commit

Permalink
Fixed email functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
cronchie committed Aug 6, 2015
1 parent c7c4d2d commit ee75774
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions lots/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@

#... For SQLite3 local db - ASKoiman ...#

'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),

# #... For Postgres local db - ASKoiman ...#
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'postgres',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
}
}

Expand Down
10 changes: 5 additions & 5 deletions lots_client/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ def apply(request):

#TODO: Get mailserver configured and running - ASKoiman 2/10/2015
## if provided, send confirmation email to applicant
#if app.email:
# to_email.append(app.email)
if app.email:
to_email.append(app.email)

## send email confirmation to settings.EMAIL_HOST_USER
#msg = EmailMultiAlternatives(subject, text_content, from_email, to_email)
#msg.attach_alternative(html_content, 'text/html')
#msg.send()
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email)
msg.attach_alternative(html_content, 'text/html')
msg.send()

return HttpResponseRedirect('/apply-confirm/%s/' % app.tracking_id)
else:
Expand Down

0 comments on commit ee75774

Please sign in to comment.