Hello, I have some spam incoming in my mailbox... The send_mail function has to be protected ... What's wrong with my code ?
def sendMail(request): from django.core.mail import send_mail if(request.POST.has_key('email')): email = request.POST['email'] else: email = '[EMAIL PROTECTED]' if(send_mail(request.POST['sujet'], request.POST['message'], email, ['[EMAIL PROTECTED]','[EMAIL PROTECTED]'], fail_silently=True)): return HttpResponseRedirect('/contact/ok/') else: return HttpResponseRedirect('/contact/fail/') I suspect there is a header injection because I receive this kind of mail : grave Content-Type: multipart/alternative; boundary=1e0c98fa270dd2b3647c0eb89d3f11f0 MIME-Version: 1.0 Subject: of bcc: [EMAIL PROTECTED] This is a multi-part message in MIME format. --1e0c98fa270dd2b3647c0eb89d3f11f0 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit us e are so many ladies, and it looks well to have a few young gentlemen with us. rethe, thou must write an invitation thou canst write thy father s name underneath. hese poetical letters --1e0c98fa270dd2b3647c0eb89d3f11f0-- Somebody can help me ? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---