On Fri, Aug 28, 2009 at 8:10 AM, Shadow<shadow.fusion.m...@gmail.com> wrote: > > Hi, > > Is it possible to execute code after sending the actual http response? > > For my website, users can optionally give an email address, and if > they do, the site sends a confirmation email. But I was thinking it's > more logical to spend time sending the email after the signup > confirmation page is sent to the user. Since sending the email doesn't > affect the http reponse at all? > > Is this possible? >
As Daniel said, you could use a queueing service or a database table to store the fact that an email should be sent later. Wouldn't you want to show the user an error message if sending the email failed? Btw, the time needed to send an email is not so long normally. I think the benefits (possibility of showing an error message, less complexity) outweigh the downsides (a bit longer processing time) Matthias -- FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---