[Chicago] Getting Pinax to send mail

Adam "Cezar" Jenkins emperorcezar at gmail.com
Sun Jul 22 05:00:05 CEST 2012


On Sat, Jul 21, 2012 at 9:49 PM, Jonathan Hayward <
christos.jonathan.hayward at gmail.com> wrote:

> I'm trying to get my Pinax project to send mail by connecting to 10.0.0.1
> port 25 (I have hand-tested that I can send emails this way.)
>
>
So we know that your SMTP service is working


> I have in my settings.py:
>
> DEFAULT_FROM_EMAIL = 'Orthodox Network <christos at pobox.com>'
> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
> EMAIL_HOST = '10.0.0.1'
> EMAIL_HOST_USER = 'christos at pobox.com'
> EMAIL_HOST_PASSWORD = ''
> EMAIL_PORT = 25
> EMAIL_USE_TLS = False
> EMAIL_SUBJECT_PREFIX = '[Orthodox Network]'
>
>
> The email backend is quoted from web snippets, but I think my 0.7 project
> is out of sync with the EMAIL_BACKEND.
>

Yea. There's nothing wrong with the above. Except you have an SMTP user set
and not a password, from the docs, "If either of these settings is empty,
Django won't attempt authentication".


>
> I can successfully import 'django.core.mail' from the virtualenv/python
> manage.py shell, but I cannot import 'django.core.mail.backends', and a dir
> on the imported module does not make it obvious where the EmailBackend
> would have been moved to. I found a snippet at
> http://djangosnippets.org/snippets/1864/ that looked promising--until I
> looked at the imports and saw that it imports a submodule of
> django.core.mail.backends.
>

Even in dev the backend hasn't moved according to the docs, so there is an
issue there somehow. You might try digging into your site-packages and see
whats in django/core/mail?


>
> Any suggestions on how I can make a python manage.py send_mail shoot over
> the messages to the server?
>
> The following, from virtualenv/python manage.py shell, successfully sent
> me a test message:
>
> >>> from django.core.mail import send_mail
> >>> send_mail('Subject here', 'Here is the message.',
> ... 'jonathan.hayward at pobox.com', ['christos at pobox.com'], fail_silently =
> False)
> 1
>
>
> And a password reset with an EMAIL_BACKEND of 'django.core.mail.send_mail'
> / 'django.core.mail' didn't leave anything in my inbox.
>
> What should I do?
>
> --
> [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> *Amazon <http://amazon.com/author/cjshayward>* • Author Bio<http://jonathanscorner.com/author/>
>  • *Email <christos.jonathan.hayward at gmail.com>* • Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • Google Plus <http://jonathanscorner.com/plus> • *Kindle<http://stornge.com/amazon>
> * • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • Orthodox
> Network <http://orthodox-network.com/> (Profile<http://orthodox-network.com/profiles/profile/cjshayward/>)
> • Twitter <http://twitter.com/JonathansCorner> • *Web<http://jonathanscorner.com/>
> * • What's New? <http://jonathanscorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site. *See one page of my website! <http://random.jonathanscorner.com/>*
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20120721/9016e7e6/attachment.html>


More information about the Chicago mailing list