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
itself with in the parameter the last email used for sending the email.
It's viable ? should it work always ? Should I instead refresh at any sent
email ? what's the best way, on the server side I can change nothing !
Thanks in advance.
Bob 2 1848
Bob,
Is set_time_limit( ) what you are looking for? timeout() is not a function.
The best was would seem to basically sent the email out to multiples at
once as you can do that if you interface with the mailer itself.
Then what you might think about doing is looping and increasing the
timeout per each item ex:
while(list($key , $val) = each($emails)) {
set_time_limit( 3); //give it 3 seconds per each email
mail(....);
}
You could try set_time_limit( 0) but I wouldn't recommend that as if you
have something caught in a loop somewhere and it is just hanging you
might as well let it terminate.
Mike 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 itself with in the parameter the last email used for sending the email. It's viable ? should it work always ? Should I instead refresh at any sent email ? what's the best way, on the server side I can change nothing !
Thanks in advance.
Bob
Hi Mike, thanks for answer, Is set_time_limit( ) what you are looking for? timeout() is not a function.
Yes, it's set_time_limit( ), but as said, I can't use this function, as it
has been disabled by the hosting service, for avoiding infinite loop that
may slow down entire server (mutual server for now, but planning to go
dedicated).
So I must find a solution without using set_time_limit. ... and sending one
email to any address using it in TO: field, as putting in BCC will result
many emails will be simply be detected as spam.
Any idea ? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Silver |
last post by:
I have a perl script running on machine A, a web server. A visitor
completes certain pieces of data and these are compiled into two emails, one
addressed to the visitor and copied to the site owner, the other addressed
to the webmaster and including cookie and timing data for debugging.
The email is sent by machine B which is the email server for the domain.
Here are some config values for the perl script, names have been changed to...
|
by: HolaGoogle |
last post by:
hi there,
i've 2 questions for you guys....
1: is there any way to "force" a session_onend(), session timeout or
at least call my logout method when a user leaves the application
window without logging out? i.e: using the "X" in the right corner???
i'd like to reset to their default all my variables session?? is this
possible???
2: I've succesfully been able to ask the user to confirm whether he
wants to extend his session before it...
|
by: Ram Baruch |
last post by:
Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to connect to my
site every X seconds and check if there is anything new to download. If
there is- it downloads a big file (using WebClient.Download() ). On MY
computer it doesn't take a ling time, but on other computers it may take
some time (lets say 10 minutes). Is there any chance that after a while .net
will raise an exception that the server is not...
|
by: A.M-SG |
last post by:
Hi,
How can I increase the HTTP Timeout value at the client side?
Thank you,
Alan
|
by: David Lozzi |
last post by:
Howdy,
I'm new to .Net 2.0... Getting
"System.Net.Mail.SmtpException: The operation has timed out"
on this script at the smtpClient.Send(msg) line
Dim msg As New MailMessage
| |
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);
|
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.
|
by: comp.lang.php |
last post by:
I came up with functions that I thought would do the trick:
if (!function_exists('smtp_close')) {
/**
* This function will close a socket resource handle
*
* Original function found at {@link
http://us3.php.net/manual/en/function.fsockopen.php#36819} Modified by
Phil Powell on 11/10/2006
|
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.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |