1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

mail()-ing to 3000 users..

Discussion in 'PHP' started by Scorpiono, Jul 7, 2007.

  1. #1
    I use a function to send mail using PHP SendMail to about 3000 users, the problem is, I always recieve an error message because the processing takes too much.

    Is my email recieved by all my users and it's just a browser issue?

    or

    How can I make it work decent? :D

    Rep will be added, thanks!
     
    Scorpiono, Jul 7, 2007 IP
  2. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What type of hosting do you have?
     
    mikebrad0927, Jul 7, 2007 IP
  3. stats

    stats Well-Known Member

    Messages:
    586
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    try batching ?

    something like ...

    on http//www.yourdomain.com/sendmail.php you push the send button, it sends a headerlocation=http://www.yourdomain.com/sendmail.php?begin=0

    your script sees the $begin value, and processes say 1000 email and after that it redirects you to headerlocation=http://www.yourdomain.com/sendmail.php?begin=1000 and so on

    it will keep sending your emails and frefreshing your page as it goes

    hope that'll help
     
    stats, Jul 7, 2007 IP
    Scorpiono likes this.
  4. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #4
    try something like this

    
    for($x=0;$x<=10000;$x++)
    {
    	echo $x."<br/>"; // send a mail instead
    	@ob_flush();
    	flush();
    }
    
    PHP:
     
    ansi, Jul 7, 2007 IP
    Scorpiono likes this.
  5. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    CodyRo, Jul 7, 2007 IP
  6. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Thanks guys
     
    Scorpiono, Jul 8, 2007 IP