Jump to content

addon module client area output function is looping mail();


leemason

Recommended Posts

im working on a script which uses the clientarea output function for addon modules.

 

accessed by: /index.php?m=modulename

 

this script is supoosed to send an email when that url is accessed.

 

which is working fine, i am recieving the emails.

 

the problem is it is sending the email every minute!!!! even when the url is only accessed once???

 

im not sure how the output of this proccessed by whmcs so i dont know if it loops through multiple time or not.

 

this is my function:

 

function prefix_clientarea($vars) {

   //send email then display page
   prefix_send_notification($vars);

	//return the vars for setting up the clientarea page
   return array(
       'pagetitle' => $array['LANG']['title'],
       'breadcrumb' => array('index.php?m=prefix'=>$array['LANG']['title']),
       'templatefile' => 'tplfile',
       'requirelogin' => false, # or true
       'vars' => array(
           'vars' => $vars
      ),
   );

}

 

should i be doing something different?

 

 

the send_notification function just does a mail(); with the vars

Edited by leemason
added details
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated