from django.contrib.auth.models import User,Group
from django.core.mail import EmailMessage
from django.template import loader
from django.contrib.auth.models import User,Group
from django.core.mail import EmailMessage
from django.template import loader
context['addresses'] = addresses
rendered = loader.render_to_string(template, context)
context['addresses'] = addresses
rendered = loader.render_to_string(template, context)
# Turn the headers into a dict so EmailMessage can turn them into a
# string again. Bit pointless, but it works.
# Turn the headers into a dict so EmailMessage can turn them into a
# string again. Bit pointless, but it works.
from_email = None
for header in headers.split('\n'):
(field, value) = header.split(':')
from_email = None
for header in headers.split('\n'):
(field, value) = header.split(':')