473,833 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout error when sending large email

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
Nov 18 '05 #1
5 2085
"BVM" <De*****@TBH.co m.au> wrote in
news:#2******** ******@TK2MSFTN GP09.phx.gbl:
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/
"Programmin g is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #2
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\mailroo t\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)
"BVM" <De*****@TBH.co m.au> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
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

Nov 18 '05 #3
BVM
Thanks. How to do async calls?

Dennis

"Chad Z. Hower aka Kudzu" <cp**@hower.org > wrote in message
news:Xn******** **********@127. 0.0.1...
"BVM" <De*****@TBH.co m.au> wrote in
news:#2******** ******@TK2MSFTN GP09.phx.gbl:
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/
"Programmin g is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #4
BVM
Thanks. I am using remote SMTP services.

Dennis
"Craig" <cs******@remoo vdis.kc.rr.com> wrote in message news:#y******** ******@TK2MSFTN GP12.phx.gbl...
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\mailroo t\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)
"BVM" <De*****@TBH.co m.au> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
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
Nov 18 '05 #5
"BVM" <De*****@TBH.co m.au> wrote in news:uumSvks5DH A.1936
@TK2MSFTNGP12.p hx.gbl:
Thanks. How to do async calls?


Im not sure how using ASP.net. You'll have to do some digging there. Sorry.
:)
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3901
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the maxRequestLength parameter of the <httpRuntime> section and that works as expected. What I want is to enforce a max file size but haven't been able to trap the error thrown when the file is too large and that's where I could use some help.
2
410
by: Mustafa Yesilkaya | last post by:
Hi. I have a problem with sql server. I have thousands of record in a database table. When i want to list all with SELECT * command in asp.net page, an error message comes : SQL SERVER TIMEOUT. But when i list with SELECT CITY command there is no error message but the process is very slow. Can you help me?
4
1516
by: Pritam Javale | last post by:
When using Datagrid ASP.NET pages, the time required to execute a report is much more greater than when the same report is generated using a ASP page. Also the ASPX page almost always gives a 'TimeOut Expired Error'.
4
6763
by: Cindy Lee | last post by:
The service works fine with small data, 75k, but if I'm sending 1meg or ..5meg, it times out. and I get the error below. I'm running a C# .net client (the error is from windows command line) and it's calling a java apache axis server. I think i need to set the time out, but do I set it on the server, or the client? and I've tried this on the client: AlertServiceService server = new AlertServiceService(); server.Timeout=-1;
2
1858
by: Bob Bedford | last post by:
I've seen many implementations of the timeout hack when sending a lot of emails. I can't set the timeout variable, as it's timeout(0) doesn't work, I still have 30 seconds. I've to send many emails with attached file, so it will take more time when the server is hardloaded, and I can't have a Cron job to do things. What's the best way ? the simplest seems to be the "location" to the script
8
13772
by: Roger Dodger | last post by:
I have to send out 2500 e-mails to student survey recipients. The e-mails will appear to come from the specific departments that they belong to. I'm utilizing PHPmailer in the scripts I wrote to accomplish this. I've written several pages to edit emails utilizing placeholders so each individual email can be personalized for the recipient, and selection page to choose recipients from the database. The code I've written works just fine...
5
8423
by: yawnmoth | last post by:
Say I have the following script: <? $timeout = 5; $start = time(); $fsock = fsockopen('125.1.119.10',80,$errno,$errstr,$timeout); // reduce $timeout by the amount of time that it took for fsockopen to connect. $timeout-=(time()-$start);
3
1522
by: fluxent | last post by:
(Environment: RedHat Linux recent, Python 2.3.5) We have a batch processing script that on occasion needs to send out an email. We have a sendmail running locally. Sometimes we get a socket timeout on sending that email. Increasing the timeout to 30sec reduced but did not eliminate it. It seems to happen more often when sending to some addresses in the UK, but it's definitely not limited to that.
1
10399
by: alvinstraight38 | last post by:
I have a client who has been receiving hundreds of SQL timeout error messages in their error logs. Specifically, the message looks like this: MESSAGE : System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
0
10500
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10543
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10213
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4422
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.