Is there a chance that sending an email via a thread could ever fail to complete?

Posted by Benjamin Dell on Stack Overflow See other posts from Stack Overflow or by Benjamin Dell
Published on 2010-06-10T08:59:44Z Indexed on 2010/06/10 9:02 UTC
Read the original article Hit count: 271

Filed under:
|

I have a project where I send a couple of emails via a seperet thread, to speed up the process for the end-user. It works successfully, but i was just wondering whether there were any potfalls that i might not have considered? My greatest fear is that the user clicks a button, it says that the message has been sent (as it will have been sent to the thread for sending) but for some reason the thread might fail to send it. Are there any situations where a thread could be aborted prematurely?

Please note, that i am not talking about network outages or obvious issues with an email recipient not existing. For simplicites sake please assume that the connect is up, the mail server alive and the recipient valid. Is it possible, for example, for the thread to abort prematurely if the user kills the browser before the thread has completed?

This might be a silly question, but i just wanted to make sure i knew the full ramifications of using a thread in this manner. Thanks, in advance, for your help.

© Stack Overflow or respective owner

Related posts about django

Related posts about threading