Mail Question

Discussion in 'PHP' started by imchandan, May 30, 2008.

  1. #1
    I have hosted my site . i want to send mails to a group of 100 people who are currently my site's subscribers. if we use php mail(), will it create any kind of server over load or any problem with server???
    i have virtual dedicated server, hosted with jumpline.com (20GB space and 200GB traffic)...
    Please help.
    Regards,
    Chandan
     
    imchandan, May 30, 2008 IP
    chandan123 likes this.
  2. Freud2002

    Freud2002 Peon

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The mail() function isn't really proc-consuming, as most of the time it uses is for connecting to the smtp server and sending the data of the mail.

    So you can safely make 100 mail(), it may take a little time to complete but it won't be overloading the server.
     
    Freud2002, May 30, 2008 IP
    chandan123 likes this.
  3. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #3
    imchandan hi buddy where u from ? IM also chandan :D

    Freud2002
    what if i make 100000 mails ? then also it works fine ?
     
    chandan123, May 30, 2008 IP
  4. redSHIFT

    redSHIFT Peon

    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'd expect PHP to run out of memory somewhere though that - at which point you'd just get a fatal error, however some of them would be sent.
     
    redSHIFT, May 30, 2008 IP
    chandan123 likes this.
  5. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #5
    yeah once i faced this error problem when i tried to insert 5000 rows :(

    any solution for this problem ?
     
    chandan123, May 30, 2008 IP
    tanujdude91 likes this.
  6. chicagoweb

    chicagoweb Peon

    Messages:
    30
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    chicagoweb, May 30, 2008 IP
    chandan123 likes this.
  7. redSHIFT

    redSHIFT Peon

    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I did have a large data entry problem once - inserting around 10,000 entries (plus) per day. The only way to get past the memory errors is to continuously optimise your code. For example - got two loops dealing with the data array? Merge them into one if you can.
     
    redSHIFT, May 31, 2008 IP
  8. Freud2002

    Freud2002 Peon

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If you have to send 100000 mails, I'd suggest to install your own SMTP server and send them from your computer (this way you'll be able to raise the amount of memory a php script can use, and also the timeout before it dies).

    But then, don't forget to add a SPF record to your DNS entries, or you can be almost certain your mails will end up in the trash folder.
     
    Freud2002, Jun 1, 2008 IP