in reply to Send mail with large address book
On the subject of timeouts sendmail has an -odq option. This means "on delivery queue". What this means is that you get spooling. Adding this will be a good idea. Warning if your sendmail is not configured the messages will never get sent so test it first!
Sendmail assumes that a single . char on a line by itself is the end of a message unless you use the -i flag (currently if your $messagebody contains this single period newline then only the message to that point will get sent just BTW so the -i option is a good idea usually) Anyway this means you could open your pipe to sendmail ONCE, add the -odq option, and just dump all the emails, separated by a "\n.\n", then close sendmail. This will be heaps faster.
open MAIL, "|/usr/lib/senmail -t -odq" or die "Oops $!"; foreach $user (@maillist) { &print_message($user); print "\n.\n"; } close MAIL; print "All done\n";
Using a database or even a flat file is better than cut and paste! Sendmail may not be the best solution. You have already been pointed to some modules. cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|