Todd Trent wrote:
> This works fine for a few test emails. What I would like to know is what is
> considered best practice considering the following things:
>
> - This could be hosted on shared hosting server.
> - Opt-in list could be less than 100 or in the 1000’s.
> - May need a way to track sending success.
>
Hello Todd,
This is solely my suggestion on the matter, and I don't think I could classify this as 'best practice', as it is just my opinion (although it might be). I suggest that you setup a mailing list that is managed by a mailing list package, like GNU Mailman, or some other mailing list manager. A good mailing list manager is designed to track issues like mail being successfully sent, user unsubscribe, etc. Let the mailing list manager software do what it is good at, and have your script simply email your messages to the mailing list, which then takes care of distribution.
If setting up a mailing list server is not possible on your shared host (very likely in a shared hosting setup), it is possible you might be able to setup a list with a third-party mailing-list hosting site. I've not researched this personally, but I'm sure probably multiple such services exist.
It should be possible, I think, in such a situation, to automate subscribing users to the list, from your scripts, when they create an account on your website (as well as initially adding all the users currently in the database, but you'd probably use a run-once script that did that in a batch).
Anyhow, that is just my thoughts on the matter. Packages like Mailman are very good at managing mailing lists, so I would just use something like that to take care of that problem.
Jeff Schmidt
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php