Ask a Question related to PERL Miscellaneous, Design and Development.
-
\Dandy\ Randy #1
Problematic delay in script
Hello, I have created a mailing program for our company that sends out
emails to our client database. There seems to be a delay in the script or
the processing of the emails. Here is how it works. The email addresses are
stored in a simple text file, one on top of each other. Each email is sent
through a foreach loop. I use this code to get email addresses and send the
emails:
open (ADDRESSES, "<address.txt") or die "Can't open file: $!";
@list=<ADDRESSES>;
close(ADDRESSES);
$mailprog="/usr/sbin/sendmail -t";
foreach $list (@list) {
chomp ($list);
($name,$email)=split(/\|/,$list);
open (MAIL, "|$mailprog") or die "Can't open main program: $!";
print MAIL "From: $adminname <$adminemail>\n";
print MAIL "To: $fullname <$email>\n";
print MAIL "Subject: $subject\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "X-MSMail-Priority: $priority\n";
print MAIL "Content-Type: multipart/alternative;\n";
print MAIL " boundary=\"separator\"\n\n";
print MAIL "This is a multi-part message in MIME format.\n\n";
print MAIL "--separator\n";
print MAIL "Content-Type: text/plain;\n";
print MAIL " charset=\"iso-8859-1\"\n\n";
print MAIL "@textonly\n\n";
print MAIL "--separator\n";
print MAIL "Content-Type: text/html;\n";
print MAIL " charset=\"iso-8859-1\"\n\n";
print MAIL "@content\n\n";
print MAIL "--separator--";
close (MAIL);
}
print "Confirmation Message";
For testing purposes, the address.txt file contains 100 email addresses ...
all different, but in the end end up in my inbox ... so if I recieve 100
emails the script works. Well it does ... I do get the 100 emails but heres
the thing ... almost right away I get about 60-70 emails ... but then the
other 30 seem to get delivered at random intervals. Some take 5 minutes,
some take 5 hours. I am puzzled why so many take so long to get delivered?
Am I overloading sendmail? or maybe my email account? Your
thoughts/reccommendations are appriciated.
Randy
\Dandy\ Randy Guest
-
Conversion from 1.5 to 2.0 problematic
I'm having trouble converting documents from InDesign 1.5 to 2.0 -- during the "Open Document" phase, the "converting data" bar gets to about 35% and... -
Fwd: [PHP-DEV] ZEND_DISABLE_MEMORY_CACHE=0 problematic on
FYI, this should be fixed now. If anyone still bumps into weird performance problems relating to the memory manager please let me know. Andi ... -
[PHP-DEV] ZEND_DISABLE_MEMORY_CACHE=0 problematic on large arrays
http://cvs.php.net/diff.php/ZendEngine2/zend_alloc.c?r1=1.118&r2=1.119&ty=h&num=10 " - Add heap to memory manager. This should improve... -
Problematic Postbacks
this may be a stupid response, after updating the database, how about rebounding the label ? news.microsoft.com wrote: -
problematic behaviour of movies using XML parser scripts in shockwave - !!!
hi, all! we are in the process of testing XML parsing in shockwave and publishing some movies on the internet, that all of them use the XML... -
Tad McClellan #2
Re: Problematic delay in script
\"Dandy\" Randy <ducott@hotmail.com> wrote:
> Hello, I have created a mailing program for our company that sends out
> emails to our client database.> Your
> thoughts/reccommendations are appriciated.
use Mail::Bulkmail;
--
Tad McClellan SGML consulting
[email]tadmc@augustmail.com[/email] Perl programming
Fort Worth, Texas
Tad McClellan Guest
-
Beau Schwabe #3
Re: Problematic delay in script
Just for test... try halving your database....i.e. send two chunks of
50 emails. Does the first 50 go through ok? The second? or does it
stop at 20 or so and spit the remainder 30 out at intermittent
intervals?
-Beau Schwabe
>Hello, I have created a mailing program for our company that sends out
>emails to our client database. There seems to be a delay in the script or
>the processing of the emails. Here is how it works. The email addresses are
>stored in a simple text file, one on top of each other. Each email is sent
>through a foreach loop. I use this code to get email addresses and send the
>emails:
>
>open (ADDRESSES, "<address.txt") or die "Can't open file: $!";
> @list=<ADDRESSES>;
>close(ADDRESSES);
>
>$mailprog="/usr/sbin/sendmail -t";
>
>foreach $list (@list) {
>chomp ($list);
>($name,$email)=split(/\|/,$list);
>
>open (MAIL, "|$mailprog") or die "Can't open main program: $!";
>print MAIL "From: $adminname <$adminemail>\n";
>print MAIL "To: $fullname <$email>\n";
>print MAIL "Subject: $subject\n";
>print MAIL "MIME-Version: 1.0\n";
>print MAIL "X-MSMail-Priority: $priority\n";
>print MAIL "Content-Type: multipart/alternative;\n";
>print MAIL " boundary=\"separator\"\n\n";
>print MAIL "This is a multi-part message in MIME format.\n\n";
>print MAIL "--separator\n";
>print MAIL "Content-Type: text/plain;\n";
>print MAIL " charset=\"iso-8859-1\"\n\n";
>print MAIL "@textonly\n\n";
>print MAIL "--separator\n";
>print MAIL "Content-Type: text/html;\n";
>print MAIL " charset=\"iso-8859-1\"\n\n";
>print MAIL "@content\n\n";
>print MAIL "--separator--";
>close (MAIL);
>}
>
>print "Confirmation Message";
>
>For testing purposes, the address.txt file contains 100 email addresses ...
>all different, but in the end end up in my inbox ... so if I recieve 100
>emails the script works. Well it does ... I do get the 100 emails but heres
>the thing ... almost right away I get about 60-70 emails ... but then the
>other 30 seem to get delivered at random intervals. Some take 5 minutes,
>some take 5 hours. I am puzzled why so many take so long to get delivered?
>Am I overloading sendmail? or maybe my email account? Your
>thoughts/reccommendations are appriciated.
>
>Randy
>
>Beau Schwabe Guest
-
Tad McClellan #4
Re: Problematic delay in script
\"Dandy\" Randy <ducott@hotmail.com> wrote:
> print MAIL "@content\n\n";
That adds space characters to the body of the email message.
Is that what you want it to do?
perldoc -q spaces
Why do I get weird spaces when I print an array of lines?
--
Tad McClellan SGML consulting
[email]tadmc@augustmail.com[/email] Perl programming
Fort Worth, Texas
Tad McClellan Guest
-
\Dandy\ Randy #5
Re: Problematic delay in script
Yes, this \n\n is required at the end of the html body content, otherwise
the multipart html will send process the separators correctly.
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnbmhd2t.89l.tadmc@magna.augustmail.com...> \"Dandy\" Randy <ducott@hotmail.com> wrote:
>>> > print MAIL "@content\n\n";
>
> That adds space characters to the body of the email message.
>
> Is that what you want it to do?
>
>
>
> perldoc -q spaces
>
> Why do I get weird spaces when I print an array of lines?
>
>
> --
> Tad McClellan SGML consulting
> [email]tadmc@augustmail.com[/email] Perl programming
> Fort Worth, Texas
\Dandy\ Randy Guest
-
\Dandy\ Randy #6
Re: Problematic delay in script
> use Mail::Bulkmail;
I do not believe my hosting company had this module installed.
R
\Dandy\ Randy Guest
-
David K. Wall #7
Re: Problematic delay in script
[TOFU rearranged to proper chronological order. Please don't do
that.]
"Dandy" Randy <ducott@hotmail.com> wrote:
>
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnbmhd2t.89l.tadmc@magna.augustmail.com...>> \"Dandy\" Randy <ducott@hotmail.com> wrote:
>>>>>> > print MAIL "@content\n\n";
>>
>> That adds space characters to the body of the email message.
>>
>> Is that what you want it to do?
>>
>>
>> perldoc -q spaces
>>
>> Why do I get weird spaces when I print an array of lines?The "\n\n" is not what Tad was talking about. If you read the FAQ> Yes, this \n\n is required at the end of the html body content,
> otherwise the multipart html will send process the separators
> correctly.
entry he referred to you'll see what Tad was asking.
--
David Wall
David K. Wall Guest
-
\Dandy\ Randy #8
Re: Problematic delay in script
"Beau Schwabe" <bschwabe@atlanta.nsc.com> wrote
news:3f68b315.19230392@usenet.nsc.com...Beau, I did a test a you suggested ...> Just for test... try halving your database....i.e. send two chunks of
> 50 emails. Does the first 50 go through ok? The second? or does it
> stop at 20 or so and spit the remainder 30 out at intermittent
> intervals?
Test #1
Sent: 50 emails all to my inbox
Result: All 50 delivered timely ... within 30 seconds
--- Waiting 2 minutes before next test
Test #2
Sent: 50 emails all to my inbox (again, same addresses)
Result: 49 delivered timely ... within 30 seconds. 1 email has not arrived.
most likely will at some point
--- Waiting 2 minutes before next test
Test #3
Sent: 100 emails all to my inbox (same addresses)
Result: 85 delivered timely ... within 30 seconds. 15 emails have not
arrived.
\Dandy\ Randy Guest
-
Tad McClellan #9
Re: Problematic delay in script
\"Dandy\" Randy <ducott@hotmail.com> wrote:
>>> use Mail::Bulkmail;
> I do not believe my hosting company had this module installed.
Then install it yourself.
--
Tad McClellan SGML consulting
[email]tadmc@augustmail.com[/email] Perl programming
Fort Worth, Texas
Tad McClellan Guest
-
\Dandy\ Randy #10
Re: Problematic delay in script
> > I do not believe my hosting company had this module installed.
???>
>
> Then install it yourself.
\Dandy\ Randy Guest
-
Sam Holden #11
Re: Problematic delay in script
On Wed, 17 Sep 2003 22:59:58 GMT, \"Dandy\" Randy <ducott@hotmail.com> wrote:
RTFM>>>>> > I do not believe my hosting company had this module installed.
>>
>> Then install it yourself.
> ???
perldoc -q module
--
Sam Holden
Sam Holden Guest
-
\Dandy\ Randy #12
Re: Problematic delay in script
"Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
Sam, I don't actually have perl installed locally, so I dont have access to> RTFM
>
> perldoc -q module
perldoc information other than what I find on [url]www.perldoc.com[/url] ... could you
post instruction? TIA!
R
\Dandy\ Randy Guest
-
Chief Squawtendrawpet #13
Re: Problematic delay in script
\"Dandy\" Randy wrote:
You're not trying very hard. If you've got access to the documentation> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on [url]www.perldoc.com[/url] ... could you
> post instruction? TIA!
on the web, go to the FAQ and try searching for the obvious: "install"
(success on the first hit) or "module" (third hit) or "CPAN" (first
hit) ...
Chief S.
Chief Squawtendrawpet Guest
-
Eric Schwartz #14
Re: Problematic delay in script
"\"Dandy\" Randy" <ducott@hotmail.com> writes:
Perl can be installed on every operating system I personally can> "Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message>>> RTFM
>>
>> perldoc -q module
> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on [url]www.perldoc.com[/url] ... could you
> post instruction? TIA!
conceive of you actually running. So go out and install it today!
Among the many benefits, you will gain the ability to test your perl
programs before uploading them to your hosting provider (This is so
useful, I can't imagine why anybody would not want to do this), and a
local copy of the latest and greatest Perl documentation that you are
guaranteed matches what is installed.
I'm not going to bother posting the URL on perldoc.com because:
A) Somebody else probably will anyway.
B) You're more than capable, and unlike me, you care.
But it's on there. Have fun.
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
Eric Schwartz Guest
-
Sam Holden #15
Re: Problematic delay in script
On Thu, 18 Sep 2003 00:03:08 GMT, \"Dandy\" Randy <ducott@hotmail.com> wrote:
The Laziness virtue is about reducing overall work, not reducing your own work> "Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message>>> RTFM
>>
>> perldoc -q module
> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on [url]www.perldoc.com[/url] ... could you
> post instruction? TIA!
by getting others to do trivial things for you.
--
Sam Holden
Sam Holden Guest
-
Tad McClellan #16
Re: Problematic delay in script
\"Dandy\" Randy <ducott@hotmail.com> wrote:
> I don't actually have perl installed locally,
Why not?
--
Tad McClellan SGML consulting
[email]tadmc@augustmail.com[/email] Perl programming
Fort Worth, Texas
Tad McClellan Guest



Reply With Quote

