I am trying to send an email to three people as follows:
if request.session['Email'] != '':
#initialize email variables
# render both html and text strings from the templates below
textmessage = render_to_string('email_text.html',
context_instance=RequestContext(request))
htmlmessage = render_to_string('email_html.html',
context_instance=RequestContext(request))
from_email='[EMAIL PROTECTED]'
to_email=request.session['Email'] +
",[EMAIL PROTECTED],[EMAIL PROTECTED]"
subject = 'Thank you from XXX'
if request.session['EmailFormat'] == 'T':
#send text email here.
send_mail(subject,textmessage,from_email,[to_email])
if request.session['EmailFormat'] == 'H':
#send the html email now
msg = EmailMultiAlternatives(subject,textmessage,
from_email, [to_email])
msg.attach_alternative(htmlmessage, "text/html")
msg.send()
The first person gets the email but not the other two. Where am i
screwing up? Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---