Results 1 to 3 of 3

Thread: php mailing list?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    php mailing list?

    i started doing a script to send emails with attachments to a mailing list in php, to move from client based emailing in VB, finally managed to send the attachments, but then i stumbled upon
    Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.
    For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages.
    here http://au.php.net/function.mail

    the mailing can be up to 800 names (opt in only), with attachment (3.5Mb) and inserted image /s in personalised html message
    although opening and closing the socket each time for emails of that size may be irrelevant anyway
    any comments, suggestions or alternatives would be welcome
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: php mailing list?

    I'm not really sure what your question is (the documentation already recommended that you use the PEAR mail package for this?).. but, if you're sending 800 emails using mail() in a loop, it's going to produce quite the server load. It may not be a huge deal, but being efficient is always helpful for future expansion.

    In any case, you could easily switch to using the PEAR mail package linked from the documentation.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: php mailing list?

    thnx, i looked at the pear package, but did not understand all, i also don't have access to change /install programs on the server, both servers i need to use already have php available, so i can use that to do whatever, if pear has to be installed, i would have to check with the server owner to find if they would allow /install

    i guess the question is is, whether pear is the best option, or despite the documentation, just to use php anyway

    i do have to try to get them to use much smaller attachments, but that is not within my control
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width