I get the same results. I dropped into the shell and tried it out
>>> user = User(username="nick", email="t...@test.com") >>> send_activation(user) 1 I think the 1 means that it passed but I don't get any emails sent On May 18, 5:08 pm, "ge...@aquarianhouse.com" <ge...@aquarianhouse.com> wrote: > what happens if you set fail_silently to True? > > On May 19, 12:05 am, Nick <nickt...@gmail.com> wrote: > > > > > I am having an issue with an authentication app I am writing. The app > > saves the form appropriately but doesn't send the confirmation email. > > I am using the same email_host settings as with other application that > > send email messages but with no results. Here is the process. > > > First a form processes the information: > > > from django.contrib.auth.forms import UserCreationForm > > from django import forms > > from django.contrib.auth.models import User > > from activate import send_activation > > > class RegisterForm(UserCreationForm): > > email = forms.EmailField(label="E-Email") > > > class Meta: > > model = User > > fields = ("username", "email") > > > def clean_email(self): > > email = self.cleaned_data["email"] > > > try: > > User.objects.get(email=email) > > except User.DoesNotExist: > > return email > > > raise forms.ValidationError("A user with that email address > > already exists.") > > > def save(self): > > user = super(RegisterForm, self).save(commit=False) > > send_activation(user) > > user.is_active = False > > user.save() > > > the activate.py file: > > > from django.core.mail import send_mail > > from hashlib import md5 > > from django.template import loader, Context > > from Obits.settings import BASE_URL as base_url > > > def send_activation(user): > > code = md5(user.username).hexdigest() > > url = "%sactivate/?user=%s&code=%s" % (base_url, user.username, > > code) > > template = loader.get_template('obits/eactivate.html') > > context = ({ > > 'username': user.username, > > 'url': url, > > }) > > send_mail('Activate account at super site', 'this is a test', > > 'myem...@mydomain.com, [user.email], fail_silently=False) > > > The form saves to the DB, it hits all of the conditions but fails to > > send an email. I can't get any error messages so I'm really at a loss. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.