Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to configure nginx to serve mail for django

Date: Mon, 12 Nov 2012 10:22:38 -0800 (PST)
From: Chris Pagnutti <chris.pagnu...@gmail.com>
To: django-users@googlegroups.com
Message-Id: <abea8533-c03b-4897-b319-3fcb8fad59fd@googlegroups.com>
Subject: How to configure nginx to serve mail for django
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_654_11035146.1352744558756"

------=_Part_654_11035146.1352744558756
Content-Type: multipart/alternative; 
	boundary="----=_Part_655_12361122.1352744558756"

------=_Part_655_12361122.1352744558756
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi.  I'm using nginx+uwsgi to serve a django app.  I'd like to configure it 
to be able to send mail with django's send_mail() and send_mass_mail() 
functions.  I've played with the nginx configuration files using the 
examples here
http://wiki.nginx.org/Configuration#Mail_examples

I have a very simple view that just does 

from django.core.mail import send_mail
send_mail('Subject here', 'Here is the message.', 'f...@example.com',
    ['...@example.com'], fail_silently=False)


but with my email addresses in there of course.  The view doesn't throw any 
exceptions, but it also doesn't send the email (or do anything else for 
that matter).  Can someone help me with getting nginx to serve email for 
django, or at least point me in the right direction?  Thanks to all.

------=_Part_655_12361122.1352744558756
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi. &nbsp;I'm using nginx+uwsgi to serve a django app. &nbsp;I'd like to configure it to be able to send mail with django's send_mail() and send_mass_mail() functions. &nbsp;I've played with the nginx configuration files using the examples here<div><a href="http://wiki.nginx.org/Configuration#Mail_examples">http://wiki.nginx.org/Configuration#Mail_examples</a><br></div><div><br></div><div>I have a very simple view that just does&nbsp;</div><div><pre style="font-size: medium; background-color: rgb(224, 255, 184); border-style: solid; border-color: rgb(148, 218, 58); border-top-width: 1px; border-bottom-width: 1px; margin-top: 1em; margin-bottom: 1em; padding: 0.3em 0.4em; overflow: auto; color: rgb(0, 0, 0); line-height: 16.78333282470703px;"><span class="kn">from</span> <span class="nn" style="color: rgb(85, 85, 85);">django.core.mail</span> <span class="kn">import</span> <span class="n">send_mail</span>

<span class="n">send_mail</span><span class="p">(</span><span class="s" style="color: rgb(187, 136, 68);">'Subject here'</span><span class="p">,</span> <span class="s" style="color: rgb(187, 136, 68);">'Here is the message.'</span><span class="p">,</span> <span class="s" style="color: rgb(187, 136, 68);">'f...@example.com'</span><span class="p">,</span>
    <span class="p">[</span><span class="s" style="color: rgb(187, 136, 68);">'...@example.com'</span><span class="p">],</span> <span class="n">fail_silently</span><span class="o" style="font-weight: bold;">=</span><span class="bp" style="color: rgb(153, 153, 153);">False</span><span class="p">)</span></pre></div><div><br></div><div>but with my email addresses in there of course. &nbsp;The view doesn't throw any exceptions, but it also doesn't send the email (or do anything else for that matter). &nbsp;Can someone help me with getting nginx to serve email for django, or at least point me in the right direction? &nbsp;Thanks to all.</div>
------=_Part_655_12361122.1352744558756--

------=_Part_654_11035146.1352744558756--