Thank you so much.
It worked, but I had to also comment out the EMAIL_BACKEND part of the
settings.py file. Thanks again.

On Jun 17, 10:57 pm, william ratcliff <[email protected]>
wrote:
> Hi Raj,
>
> It sounds like your problem is email, rather than the form.   In our
> settings.py we use:
>
> EMAIL_USE_TLS= True
> EMAIL_HOST='smtp.webfaction.com'
> EMAIL_HOST_USER='<my_mailbox>'
> EMAIL_HOST_PASSWORD=r'<mailbox_passwd'
> EMAIL_PORT=587
> DEFAULT_FROM_EMAIL='My Company <[email protected]>'
> SERVER_EMAIL='[email protected]'
>
> Webfaction has the concept of a mailbox, which you setup and that is your
> email host user.
> Your email host password is what you set from their control panel.   The
> default from email and the server email need to be valid emails for the
> mailbox that you have created at webfaction.   If this doesn't work, then
> test your code with a known email provider (ex. gmail) and verify that it
> works.   For gmail the email host will be smtp.gmail.com.  Change the
> email_host_user and password to your gmail account.
>
> Good Luck!
>
> William
>
>
>
>
>
>
>
> On Fri, Jun 17, 2011 at 12:43 PM, raj <[email protected]> wrote:
> > Thanks, I tried the shell thing above. It says that it sends without
> > error, but I still dont receive any emails. Thank you
> > -Raj
>
> > On Jun 17, 12:23 pm, william ratcliff <[email protected]>
> > wrote:
> > > If you can wait, I use webfaction and can give you a response for what we
> > do
> > > when I get home late tonight--the email part was a bit annoying to
> > > setup--the main thing is to recognize that they are using their mailbox.
>
> > > Best,
> > > William
>
> > > On Fri, Jun 17, 2011 at 2:27 AM, raj <[email protected]> wrote:
> > > > Hey guys,
>
> > > > I have a webfaction account, and I was trying to get a contact form
> > > > working for my website. The problem is that I can't seem to get it to
> > > > work. Can someone walk me through this? I couldn't figure it out from
> > > > the djangobook tutorial. I think something is wrong with my settings
> > > > and stuff. Here are my files:
>
> > > > forms.py:
>
> > > > from django import forms
>
> > > > class ContactForm(forms.Form):
> > > >    email = forms.EmailField()
> > > >    name = forms.CharField()
> > > >    subject = forms.CharField()
> > > >    message = forms.CharField(widget=forms.widgets.Textarea())
>
> > > > views.py:
>
> > > > def contact(request):
> > > >    if request.method == 'POST':
> > > >        form = ContactForm(request.POST)
> > > >        if form.is_valid():
> > > >            cd = form.cleaned_data
> > > >            send_mail(
> > > >                cd['subject'] + " - " + cd['name'],
> > > >                cd['message'],
> > > >                cd.get('email', '[email protected]'),
> > > >                ['[email protected]'],
> > > >            )
> > > >            return HttpResponseRedirect('/contact/thanks/')
> > > >    else:
> > > >        form = ContactForm()
> > > >    return render_to_response('/home/oneadmin/webapps/oneadmin/
> > > > oneadmin/templates/oneadmissions/contact.html', {'form': form},
> > > > context_instance=RequestContext(request))
>
> > > > def thanks(request):
> > > >    return render_to_response('/home/oneadmin/webapps/oneadmin/
> > > > oneadmin/templates/oneadmissions/random.html', {'phrase': "Thank you!
> > > > We will get back to you shortly"},
> > > > context_instance=RequestContext(request))
>
> > > > settings.py:
>
> > > > EMAIL_HOST = 'smtp.webfaction.com'
> > > > EMAIL_HOST_USER = '[email protected]' #the email account that
> > > > receives the email
> > > > EMAIL_HOST_PASSWORD = 'PASSWORD'
> > > > EMAIL_USE_TLS = True
>
> > > > *****I've tried adding an EMAIL_PORT, DEFAULT_FROM_EMAIL, and
> > > > SERVER_EMAIL variables, didn't do anything.
>
> > > > urls.py:
> > > > urlpatterns = patterns('',
> > > >                        (r'^contact/$', views.contact),
> > > >                        (r'^contact/thanks/$', views.thanks),
> > > > )
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Django users" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected].
> > > > For more options, visit this group at
> > > >http://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 [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to