I'm trying to send a e-mail, but getting this error. Don't know what
to do... Any ideas?
Thanks in advance.

def urlsend(request, username):
    if request.method == 'POST':
        form = SendMailForm(request.POST)
        if form.is_valid():
            subject = form.cleaned_data['subject']
            message = form.cleaned_data['message']
            to_email = form.cleaned_data['to_email']
            try:
                send_mail(subject, message, 'u...@exmpl.com',
to_email, fail_silently = False,
                    auth_user = 'u...@exmpl.com', auth_password =
'pass')
            except Exception, e:
                raise ValueError,e
            return HttpResponseRedirect('/'+username+'/')
        else:
            sendMail = SendMailForm(request.POST)
            variables = RequestContext(request, {
                'username': username,
                'form' : form,
            })
            return render_to_response('send_mail.html', variables)
        return HttpResponseRedirect('/'+username+'/')
    else:
        return HttpResponseRedirect('/'+username+'/')
--~--~---------~--~----~------------~-------~--~----~
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