Ignore:
Timestamp:
Jul 2, 2010, 7:32:30 AM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, fysm-4-1, space-access, stable, stage, test-hooks
Children:
dbaeedf
Parents:
869f620
git-author:
Alex Dehnert <adehnert@…> (07/02/10 07:29:27)
git-committer:
Alex Dehnert <adehnert@…> (07/02/10 07:32:30)
Message:

BCC asa-fysm instead of sending to asa-fysm

Sending to asa-fysm just clutters the to line --- we'd get replies anyway,
because asa-fysm is the sender. BCC instead to make the emails look cleaner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    radfe18c rd199ba4  
    1111from django.http import Http404, HttpResponseRedirect
    1212from django.core.urlresolvers import reverse
    13 from django.core.mail import send_mail, mail_admins
     13from django.core.mail import EmailMessage, mail_admins
    1414from django.forms import Form
    1515from django.forms import ModelForm
     
    184184            })
    185185            body = tmpl.render(ctx)
    186             recipients = ['asa-fysm@mit.edu', group_obj.officer_email, ]
    187             send_mail(
    188                 'FYSM entry for "%s" updated by "%s"' % (
     186            email = EmailMessage(
     187                subject='FYSM entry for "%s" updated by "%s"' % (
    189188                    group_obj.name,
    190189                    request.user,
    191190                ),
    192                 body,
    193                 'asa-fysm@mit.edu',
    194                 recipients,
     191                body=body,
     192                from_email='asa-fysm@mit.edu',
     193                to=[group_obj.officer_email, ],
     194                bcc=['asa-fysm@mit.edu', ]
    195195            )
     196            email.send()
    196197            return HttpResponseRedirect(reverse('fysm-thanks', args=[fysm_obj.pk],)) # Redirect after POST
    197198
Note: See TracChangeset for help on using the changeset viewer.