Re: django mail_admins source code

2010-08-05 Thread Tom Evans
On Thu, Aug 5, 2010 at 10:31 AM, kostia wrote: > ... > I think to use something like > recipients = [] > for admin in settings.ADMINS: >     recipients += admin[1] > > But it seems to be unprofessional. > 'List comprehension' recipients = [ email for name, email in

Re: django mail_admins source code

2010-08-05 Thread Steve Holden
On 8/5/2010 7:18 AM, euan.godd...@googlemail.com wrote: > AFAIK mail_admins is designed to send error messages to the site > administrator, not for the purpose you are proposing, so you won't get > the original email. Your proposal seems reasonable enough to me since > you're not using mail_admins

Re: django mail_admins source code

2010-08-05 Thread euan.godd...@googlemail.com
AFAIK mail_admins is designed to send error messages to the site administrator, not for the purpose you are proposing, so you won't get the original email. Your proposal seems reasonable enough to me since you're not using mail_admins as designed. Why take only the second admin email address? On

django mail_admins source code

2010-08-05 Thread kostia
I have a contact form on my site. The code which send the emails after successful validation is below: def contact(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_valid(): if request.POST['send_me']: