Hi,
I am using 0.96 version of django and I am not able to import
EmailMessage.
I have to send attachment with the mail and for that I am using
EmailMessage but not able to import it.
Does any one has a idea how to do it.
here is my code:
if emailform.is_valid():
subject = emailform.clean_data['subject']
message = emailform.clean_data['message']
attach = request.FILES['attach']
try:
mail = EmailMessage(subject, message, sender,
mailing_list)
mail.attach(
attach.name, attach.read(),
attach.content_type)
mail.send()
#send_mail(subject, message, sender, mailing_list)
Thanks