fullyloaded has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on sending bulk emails in a specified time

Replies are listed 'Best First'.
(cLive ;-) Re: sending bulk emails in a specified time
by cLive ;-) (Prior) on Feb 01, 2002 at 07:33 UTC
    Make sure you read this, this and this before trying to send bulk e-mails.

    .02

    cLive ;-)

Re: sending bulk emails in a specified time
by vek (Prior) on Feb 01, 2002 at 06:10 UTC
    Well, what have you tried so far? Where are you having the problem? You could try posting some code so that some assistance can be offered...
Re: sending bulk emails in a specified time
by nmerriweather (Friar) on Aug 10, 2002 at 17:32 UTC

    Why do people go one the offensive whenever bulk email is brought up on a programming board or mailing list?

    Why assume the worst?

    Its a pretty illogical and ill conceived notion that someone who wants to write a custom script to handle some form of bulkmailing wants to spam people.

    If i wanted to spam, I would either pay $50 for one of those commercial spam apps and not worry about coding anything, or I would buy my list of email addresses from a place that throws in a free spam app.

    To think that someone wants to spam just because they Bulk Mail is fucking ridiculous. There are hundreds more 'valid' 'ethical' etc reasons to Bulk Mail than there are to blind spamming. Spamming is ridiculously easy, and costs pennies to set up 'out of the box' in comparison to writing a custom app to bulk requested information to subscribers.

    Get off your damn high horses. Take your 'anti-spamming' sentiments out on people who are actually spamming, not on those who are legitimately working with opt-in lists.

Re: sending bulk emails in a specified time
by fullyloaded (Initiate) on Feb 03, 2002 at 13:13 UTC
    ok this is what i have....
    my %mail = ( To => $email, From => $adminemail, smtp => $smtp, port => $port, Subject => $subject, Message => $body, ); sendmail(%mail) or die( 'Couldnt send mail:', Mail::Sendmail->erro +r() ); sleep 1;
    but i do not know where to go from here, how i can specify a certain number of emails in a specific time.

    thanks

    edited by dws to add <code> tags

      Of course we are going to need a note from your mother that you aren't going to do any spamming ;-}

      The simplest way to do this would be to have a counter in your loop so that you could have something like:

      ... my $number_of_emails_per_minute = 100; .. my $time = time(); my $count = 0; while(WHEREVER YOUR ADDRESSES ARE COMING FROM) { # do whatever you do to send mail $count++; if ( $count == $number_of_emails_per_minute ) { my $time_left = 60 - ( time() - $time ); sleep $time_left; $time = time(); $count = 0; } }

      I haven't got Mail::Sendmail on here at the moment so I can't make a proper example I'm afraid

      /J\

        lol nah im not doing it for spam purposes :) cheers for the code, it works a treat except for one problem, im running my perl script from a browser so the browser is sitting there processing the emails for a couple of minutes before the perl script can carry on and redirect the page, how do i over come this, i want the page to redirect and have the emails sent in the background, so i can continue to use the page. i also want to try and aviod timeouts if possible, have u got any suggestions? thanks i appreciate your help :)
      While youre at it, why not use <code> tags. It makes you code easier to read.