I have a Zend Framework project using version 1.10.8 with Doctrine 1.2.4.I use Zend_Auth and Zend_Acl where actions are resources. i have added newsletter functionalitiy recently and being wondering how i would play out together.This my first time doing a real newsletter stuff and with Zend in addition.
So my first approach would be have a php script to connect to the db get the template, get the name and email of subscriber . parse the template for customization for users and send it. i will be using swiftMailer. so i would set a cron job to call that file for every period.
Now my worries are with the ACL .if the script is outside Zend (ie my project)and hitting a Zend action(url) to perform all the stuffs how would the system authenticate itself (i mean by system the cron running the php file)?
What are the other approach for using ZF. thanks
The required resource to access the given url i.e. /newsletter/send would be accessible to all people. It doesn’t matter if real people hit the url, as the content of that page would be quite uninteresting =)
The script itself would simply check if there are mails to send and then grab all users from DB, etc. The Newsletter-methology is pretty unreliant on Zend.
You can easily do the templating stuff with Zend and Zend_Mail, too though. This is how i handle E-Mails in Zend:
Hope this is what youre asking for =)