Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8094821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:55:17+00:00 2026-06-05T20:55:17+00:00

I have a Zend Framework project using version 1.10.8 with Doctrine 1.2.4.I use Zend_Auth

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:55:19+00:00Added an answer on June 5, 2026 at 8:55 pm

    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:

    $mail = new Zend_Mail('UTF-8');
    
    $mailView = new Zend_View();
    $mailView->setScriptPath(APPLICATION_PATH.'/views/email/');
    $mailView->assign('title', $this->_report->getTitle());
    $mailView->assign('text', $this->_report->getText());
    
    $mail->addTo($user->getEmail(), $user->getFullnameBySurname());
    $mail->setBodyHtml($mailView->render('emailregular.phtml')); // /application/views/email/emailregular.phtml
    $mail->setBodyText(strip_tags($mailView->render('emailregular.phtml'))); //might not be the cleanest way...
    
    try {
        $mail->send();
        $mail->clearRecipients(); // This clears the addTo() for Zend_Mail as in my script i only have one instance of zend_mail open while looping through several users
        $this->_log->info('Mail out for user ....');
      } catch (Zend_Mail_Transport_Exception $e) {
        $this->_log->error('Zend_Mail_Transport_Exception for User('.$user->getid().') - Mails were not accepted for sending: '.$e->getMessage());
      } catch (Zend_Mail_Protocol_Exception $e) {
        $this->_log->error('Zend_Mail_Protocol_Exception for User('.$user->getid().') - SMTP Sentmail Error: '.$e->getMessage());
      } catch (Exception $e) {
        $this->_log->error('Unknown Exception for User('.$user->getid().') - SMTP Sentmail Error: '.$e->getMessage());
      }
    

    Hope this is what youre asking for =)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Doctrine 1.2 as my ORM for a Zend Framework Project. I have
I have been using svn:externals to bring the Zend Framework files into my project.
I have to work on this project written using Zend Framework. This is a
I have a project written with zend framework. I was using xampp for my
I'm currently developing a Zend Framework project, using Doctrine as ORM. I ran into
I have PHP project and I am using Zend Framework. There is a library
Hi all I am using Zend framework for my PHP project. Basically I have
I have just started working on a project and I am using zend framework
I have project written in Zend Framework and it works fine most of environments.
I have a PHP MVC application using Zend Framework. As presented in the quickstart,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.