Hi,

well there is solution that can be found by google because i did :-)

Take a look here:

http://ui.co.id/blog/asynchronous-send_mail-in-django

This is how i did sending emails in my project, also sending mass
emails.
As in example, after calling the 'send_mail' function in your view or
whatever, execution immediately continues in it's own thread and will
not 'wait' for the send_mail function to be executed entirely.

All you need is to change run method in EmailThread according your
needs.

Hope it helps.

Radovan

On 21. Júl, 16:06 h., Michael Hipp <mich...@hipp.com> wrote:
> I've been googling extensively but can't seem to find an real answer for 
> this...
>
> - User clicks a button to send a batch of emails to customers
> - Django view kicks off a thread to send the emails using django.core.mail
> - The view response sends the user to a page that will monitor progress
>    using periodic ajax calls
>
> Questions:
> - How does the thread communicate progress back to a place where the ajax
> driven view can pick it up and return it to the user?
> - Is there a problem running django.core.mail in a thread?
>
> (I'd prefer not to use some of the heavyweight solutions relying on daemons 
> and
> other stuff running entirely outside Django and cron doesn't make the user 
> feel
> involved. In my wxPython desktop apps this stuff is pretty easy using pubsub.
> But I don't see how to make that work in Django.)
>
> Thanks,
> Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to