email in separate thread
joeygartin
joeygartin at gmail.com
Fri Apr 10 10:36:24 EDT 2009
Greetings,
Disclosure: I am a total newbie!
I am building an application Django and come to a dilemna when sending
off emails. I have an application that sends off an email after a
customer has filled out a form, actually it sends off 7 emails.
The problem is the page hangs while the emails are sent. My current
hosting situation does not give me direct access to an email queue.
So I have two options (that I can think of):
1) Write the email information to a file and then run a cron job in
the background that routinely checks the file and sends the necessary
emails off
OR
2) Spin-off a thread (which I have no background with at all!) for the
emails and be able to redirect the user to the next page.
I have posted this problem on the Django users group, but did not
really get a usable response. If any of you have dealt with this or
know of an actual solution, please help.
Thank you!
More information about the Python-list
mailing list