Timeout error when sending large email

B

BVM

Hi:

I have a problem when sending large email(more than 20Mb) from a web page. I got timeout error. How to overcome this problem? I am thinking to have a thread to send email. Once the thread starts, return response to client immediately. The client should be able to kee checking if the thread is finished. If it's finished, return back a value. I don't know whether it works or not. Any idea, please.

Thanks,

Dennis
 
C

Chad Z. Hower aka Kudzu

BVM said:
I have a problem when sending large email(more than 20Mb) from a web
page. I got timeout error. How to overcome this problem? I am thinking
to have a thread to send email. Once the thread starts, return response
to client immediately. The client should be able to kee checking if the
thread is finished. If it's finished, return back a value. I don't know
whether it works or not. Any idea, please.

You need to use the async calls and feed back a little bit of data at a time
to keep the browser happy.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Craig

Actually, if you're sending via a local SMTP service I have found that constructing a .msg formatted email and dumping it to the inetpub\mailroot\pickup folder is by far the best way. By doing this, it writes out the whole message and the pickup folder is essentially putting it in queue and allows the page to continue loading. You'll need to read up a bit more about it and MIME encoding, but it's my favorite way.

If you're using a remote SMTP service you've got no choice but to do as the other post instructed with async or feeding data to browser at intervals to it from timing out. (You can do Response.Write("<I></I>"); as long as you want. Note that this is generally a bad practice though)
Hi:

I have a problem when sending large email(more than 20Mb) from a web page. I got timeout error. How to overcome this problem? I am thinking to have a thread to send email. Once the thread starts, return response to client immediately. The client should be able to kee checking if the thread is finished. If it's finished, return back a value. I don't know whether it works or not. Any idea, please.

Thanks,

Dennis
 
B

BVM

Thanks. I am using remote SMTP services.

Dennis
Actually, if you're sending via a local SMTP service I have found that constructing a .msg formatted email and dumping it to the inetpub\mailroot\pickup folder is by far the best way. By doing this, it writes out the whole message and the pickup folder is essentially putting it in queue and allows the page to continue loading. You'll need to read up a bit more about it and MIME encoding, but it's my favorite way.

If you're using a remote SMTP service you've got no choice but to do as the other post instructed with async or feeding data to browser at intervals to it from timing out. (You can do Response.Write("<I></I>"); as long as you want. Note that this is generally a bad practice though)
Hi:

I have a problem when sending large email(more than 20Mb) from a web page. I got timeout error. How to overcome this problem? I am thinking to have a thread to send email. Once the thread starts, return response to client immediately. The client should be able to kee checking if the thread is finished. If it's finished, return back a value. I don't know whether it works or not. Any idea, please.

Thanks,

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top