hi all... i'm trying to send an email attachment and am getting the
following traceback:

global name 'EmailMessage' is not defined

Here's the code:

[...]
    from django.core.mail import send_mail

    list2send = mymodel.objects.filter(idNumber = 3)
    filecontent = render_to_string('template_excel.html',
{'trs':list2send})
    filename = 'myfile.xls'

    emailmsg = "See Attached"
    to_email="x...@xxxx.com"
    subject  = "important email subject here"
    message = EmailMessage(subject, emailmsg,
'fromem...@domainname.com',to_email,attchements=(filename,filecontent,'application/
vnd.ms-excel'))

    message.send()


am i not importing something?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to