Reputation: 6884
I'm new to codeigniter, and I'm trying to figure out how to implement a weekly digest, sent to members.
I currently have the email set up correctly, and now am trying to get the 'weekly' part down. I know how to use date / time functions to check if one week has elapsed, but how do I run something, say, 'every monday at 8pm' without having to click on my site. Can I do this in CodeIgniter ?
Thanks,
Michael
Upvotes: 0
Views: 2979
Reputation: 32721
Here you can watch a screen cast. How to send email using codeigniter.
And here you can watch a screen cast How to make a Newsletter signup page using codeigniter.
Upvotes: 0
Reputation: 18014
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:
protocol
and the four smtp_
arguments.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:
Upvotes: 6