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 9152463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:03:11+00:00 2026-06-17T12:03:11+00:00

Hi i have issue here of calling another controller action to send an mail,

  • 0

Hi i have issue here of calling another controller action to send an mail, here is my code:

user.php

public function followAction()
{
     $follow_id = $this->_getParam('id');
     $response = "<a href='javascript: void(0)'  class='i-wrap ig-wrap-user_social i-follow_small-user_social-wrap'><i class='i i-follow_small-user_social ig-user_social'></i>Stop Following</a>";

     notifyEmail()  ------> need to call Notity Controller with notifyEmail() Action along with           
                       params
     $this->_helper->json($response);  ----> return json response
}

NotifyController.php

<?php

class NotifyController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */

    }

     public function index()
    {

    }

     public function notifyEmailAction()
    {
          // rest of email code goes here
    }

}

Thanks for help!

  • 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-17T12:03:12+00:00Added an answer on June 17, 2026 at 12:03 pm

    You have to move send mails functionality to another place,
    and call it in both methods.

    Check this thread
    Calling member function of other controller in zend framework?

    I suggest to create at the path /library a new folder ‘My’ and in it new file Utilities.php and in that file a new class where you can put all your help methods

    class My_Utilities {
        // put here your custom help methods
    }
    

    You need to auto-load that namespace.In configs/application.ini put

    autoloaderNamespaces.my = "My_"
    

    Then you can use namespace My_ and class My_Utilities.


    In any case, you can call method form another controller:

    include 'NotifyController.php';
    $a = new NotifyController($this->_request, $this->_response);
    $a->notifyEmailAction();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue going on here. I am using PHP to get values
Have another issue here. Our app starts out with a tab activity. But, before
I have a curious issue here In my ejbCreate() method from where i insert
I'm have a weird issue here. I have a UITableView using custom UITableViewCells. Everything
Hey guys I have a little issue here. I have a panel where I
I'm not sure if I have a threading issue here or not. On the
I have a really weird issue here. I'm using my local development server right
Having an issue here that I have tried everything I can think of but
im having a little issue here. I have MediaElement.js set on my project. It
I am stuck with a peculiar issue here. I have a script that basically

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.