Re: send_mail on MAC OS X 10.7

53 views
Skip to first unread message

Laxmikant Gurnalkar

unread,
Oct 2, 2012, 5:36:18 AM10/2/12
to django...@googlegroups.com
Comment the csrf from settings. It doesnt work when you want.I use session and own credentials to do that
And just write a simple view to send mail.
This will work without csrf or any of credentials & etc.

Cheers

Laxmikant

On Tue, Oct 2, 2012 at 6:15 AM, Cheng <chb...@googlemail.com> wrote:
Hi,

I am new to django.

I am following The Definitive Guide to Django SECOND EDITION by Adrian Holovaty and Jacob Kaplan -Moss and I cannot get the contact form to send mail. First the eg did not work at all until I added the @csrf-exempt decorator. Keeps getting Error 61 Connection Failure after that.

Would be grateful if someone can help.

Thanks,
Cheng

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/r40DN0e3ybAJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
GlxGuru

Cheng

unread,
Oct 2, 2012, 2:25:39 PM10/2/12
to django...@googlegroups.com
Hi Laxmikant,

Do you mean this statement (I can't find any other that refers to csrf) in settings

   'django.middleware.csrf.CsrfViewMiddleware',

I commented it, but it still gives me error 61 - Connection refused.

Thanks,
Cheng Hong
Message has been deleted

Russell Keith-Magee

unread,
Oct 2, 2012, 11:11:32 PM10/2/12
to django...@googlegroups.com
On Tue, Oct 2, 2012 at 1:36 PM, Laxmikant Gurnalkar
<laxmikant...@gmail.com> wrote:
> Comment the csrf from settings.

Please be *very* careful giving this advice. Advising someone to
disable CSRF will almost universally be the wrong advice. By disabling
CSRF, you're exposing your site to known and avoidable security
problems.

If you're getting CSRF errors, It's *much* better to try an understand
what's going on and deal with the actual problem, rather than just
making the problem "go away".

Yours,
Russ Magee %-)

Laxmikant Gurnalkar

unread,
Oct 3, 2012, 4:19:17 AM10/3/12
to django...@googlegroups.com
Hi,
Thanks for the suggestion Russell,
I never felt insecure when I dont use csrf. Since I hv disabled.
anyways, Thanks again.

Laxmikant
 


--
You received this message because you are subscribed to the Google Groups "Django users" group.

Russell Keith-Magee

unread,
Oct 3, 2012, 4:24:30 AM10/3/12
to django...@googlegroups.com
On Wed, Oct 3, 2012 at 12:19 PM, Laxmikant Gurnalkar
<laxmikant...@gmail.com> wrote:
> Hi,
> Thanks for the suggestion Russell,
> I never felt insecure when I dont use csrf. Since I hv disabled.
> anyways, Thanks again.

I don't want to appear rude, but I suspect the only reason you don't
feel insecure is because you don't fully understand the risks.

There's a reason Django has CSRF protection turned on by default. CSRF
attacks are very real, very common, and very easy to manufacture. If
you're not taking steps to prevent CSRF attacks, any website you
produce is potentially at risk. I *strongly* urge you to do some
research into CSRF attacks, and if you have problems with Django's
CSRF framework, ask about and solve those problems -- don't just turn
off CSRF protection and declare that your site works.

Yours,
Russ Magee %-)

Laxmikant Gurnalkar

unread,
Oct 3, 2012, 4:30:30 AM10/3/12
to django...@googlegroups.com
Okay, Thanks. Will hv to do that.


Yours,
Russ Magee %-)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
GlxGuru

Kolbe

unread,
Oct 3, 2012, 8:37:44 AM10/3/12
to django...@googlegroups.com
did you start the sendmail program?

Cheng

unread,
Oct 3, 2012, 1:39:30 PM10/3/12
to django...@googlegroups.com, wlf...@ix.netcom.com
Hi Dennis,

I am not familiar with setting up the Mac. How do I check the STMP service on the Mac?

I am able to send email through the Mac's Mail application though. The outgoing mail server for the Mail application is smtp.googlemail.com. The incoming mail server for the Mail application is imap.googlemail.com.

Thanks,
Cheng

On Tuesday, October 2, 2012 9:45:17 AM UTC-7, Dennis Lee Bieber wrote:
On Tue, 2 Oct 2012 07:25:39 -0700 (PDT), Cheng <chb...@googlemail.com>
declaimed the following in gmane.comp.python.django.user:

>
> I commented it, but it still gives me error 61 - Connection refused.
>
        How is the outgoing email SMTP configuration specified?

        
--
        Wulfraed                 Dennis Lee Bieber         AF6VN
        wlf...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Cheng

unread,
Oct 3, 2012, 1:42:13 PM10/3/12
to django...@googlegroups.com
Hi Kobe,

I am not familiar with the Mac's setup.
Do you mean the Mac's Mail application?  If so, yes. If not, how do I start the sendmail program?

Thanks,
Cheng

Tom Evans

unread,
Oct 3, 2012, 2:09:44 PM10/3/12
to django...@googlegroups.com
On Wed, Oct 3, 2012 at 2:39 PM, Cheng <chb...@googlemail.com> wrote:
> Hi Dennis,
>
> I am not familiar with setting up the Mac. How do I check the STMP service
> on the Mac?
>
> I am able to send email through the Mac's Mail application though. The
> outgoing mail server for the Mail application is smtp.googlemail.com. The
> incoming mail server for the Mail application is imap.googlemail.com.
>
> Thanks,
> Cheng

If you know the right SMTP server to use, then simply configure django
to use it:

https://docs.djangoproject.com/en/1.4/ref/settings/#email-host

Cheers

Tom

Fred Stluka

unread,
Oct 3, 2012, 4:01:59 PM10/3/12
to django...@googlegroups.com
Cheng,

Yeah, there's probably no need to be running sendmail on the Mac
if you only use it as a client machine, not a server that accepts
incoming mail requests from other machines.  Just configure Django
to use an SMTP server somewhere in the world that you have rights
to use, like smtp.googlemail.com as you do with your Apple Mail
client.

--Fred
Fred Stluka -- mailto:fr...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
Reply all
Reply to author
Forward
0 new messages