You don't want the email helper but rather the email class. Check out the documentation. The instructions explain themselves. The only advice I can give you from experience is:
- Use SMTP. It has performed better, is less susceptible to spam filters, and much more smoothly works across different servers in my experience. You need to pass five configuration arguments,
protocol
and the four smtp_
arguments.
- Save your settings as a config file (check the docs). It will save you some headaches.
In terms of creating it, you can either do it manually or create it automatically from a database. If you do it manually, just set the emailing script as the output script, and you're done.
If the newsletter is made automatically, and if you don't have that many users, setting a cron job that runs the emailing script will do just fine. If you have a lot of users, send it out in batches.
Other things to think about:
- Don't send out a single email with multiple addresses in the To or BCC fields. Just loop through the emails one at a time and send them. It'll be better for spam protection and it makes more sense. People don't like receiving emails that aren't addressed to them or are addressed to hundreds of others.
- Put up some universal failsafe script that prevents emails from being sent too often. A simple fwrite to a log file with the most recent mailing date would do the trick. Alternately, you could keep a DB of all sent emails and the time they were sent.