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.

PHP Mass mailing?

Discussion in 'PHP' started by giraph, Jul 17, 2006.

  1. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Hmm.. I decided to not close and make new connections and it seems to have worked fine. 13,000 emails recieved succesfully, thanks for your help guys. Script took about 5 minutes or so to finish. Now to deal with the message text not showing right.
     
    giraph, Jul 18, 2006 IP
  2. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Well in case anyone else is ever using swift mailer, don't put their mail function in a for statement; it doesn't work :). Just send it an array of e-mails instead of just one and it will handle everything fine.
     
    giraph, Jul 18, 2006 IP
  3. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #23
    Any chance you'd want to share the code on this?

    I am having a similar problem with my daily riddles email.
     
    GeorgeB., Sep 6, 2006 IP
  4. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #24
    So swift handles the looping through the array for you? Doesn't that cause problems with it trying to send too many mails at once just giving it an array of 13k mails like that?
     
    GeorgeB., Sep 7, 2006 IP
  5. kirby009

    kirby009 Peon

    Messages:
    608
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #25
    you might have find some software for that. mailing that many all at once is not good try to split them into 500's list
     
    kirby009, Sep 13, 2006 IP
  6. kojakfilth

    kojakfilth Notable Member

    Messages:
    3,000
    Likes Received:
    213
    Best Answers:
    0
    Trophy Points:
    210
    #26
    Can you send me the mass mailing script.. Please..
     
    kojakfilth, Oct 11, 2006 IP
  7. smallbizstartupkit

    smallbizstartupkit Well-Known Member

    Messages:
    163
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #27
    Have you tested phpmailer. It's my personal favorite. Although I've not used it for 10,000. I have sent thousands with efficient speed.
     
    smallbizstartupkit, Nov 1, 2006 IP
  8. craigmaclean

    craigmaclean Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #28
    Hey guys,

    I'm looking for some consulting on email marketing/mass mailing. Please PM me if your interested.

    Thanks!
     
    craigmaclean, Sep 22, 2009 IP
  9. mdrobiul

    mdrobiul Peon

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #29
    you can play with header('Refresh: 3; url=index.html'); // redirect or reload the current page automatically.

    logic is:

    1. list unsent emails from database and split the emails into 100 or 200
    2. then send next unsent 100 emails and update their status as sent in database
    3. then get a flag of $done and if $done then checks if it has still unsent emails in database
    4. if still unsent emails in database, then header('Refresh: 2; url=mail.php'); // mainly refresh current page
    5. if no unsent emails then header('location: done.html'); and include a notification email to you! // redirect to done page
     
    mdrobiul, Sep 22, 2009 IP
  10. almondj

    almondj Peon

    Messages:
    768
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    0
    #30
    I think the pagination idea is the best.

    1. Use for to determine how many pages you will need
    2. Query Your Emails 100 at a time
    3. Send the emails 100 at a time
    4. Then use the header function to go to the next page after three or so seconds (this will take trial and error) header('refresh: 3; page.php?page=#');
    5. At the end, send yourself an email letting you know that the emails have been sent. if($i == $lastresult) { mail(me, emails are done, all emails have been sent sir!); } (the $lastresult is really just the total number of emails you have, in your case it's about 13,000)
     
    almondj, Sep 23, 2009 IP
  11. mdrobiul

    mdrobiul Peon

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #31
    yeah. this is how we are giving 'refresh' to browsers, server and ensuring performance. but yes we should use STMP or pop or sendmail service. phpmailer or pear mail.
     
    mdrobiul, Sep 24, 2009 IP
  12. jNorth

    jNorth Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #32
    yes, this works. I have coded a php mailer this way. However, you host may limit the number of emails you send by the hour. Ours sends one every 6 seconds. one to each email because a custom link is provided to opt out. Takes several hours to do about 4000 emails, but it works
     
    jNorth, Sep 24, 2009 IP