Jump to content

Fastest way to turn off emails


Kian

Recommended Posts

Hi,

 

This time I have a question to ask. What's the fastest way to stop WHMCS from sending emails? I need to entirely disable mailing system. I usually disable all Email Templates but maybe there's a fastest way... or not? Maybe there's an awesome checkbox that I have never found :oops:

 

Thank you

Link to comment
Share on other sites

  • 6 years later...
  • 7 months later...
<?php

use WHMCS\Database\Capsule;

return;

function hook_disableAllEmails($vars) {
    
    $disallowedGroupID = '1'; // Insert Client Group ID
    if (!Capsule::select(Capsule::raw('SELECT id FROM tblclients WHERE id = "' . $vars['relid'] . '" AND groupid = "' . $groupid . '" LIMIT 1'))) {
        $output['abortsend'] = true;
        return $output;
    }
}
add_hook("EmailPreSend", 1, "hook_disableAllEmails");

?>

This is not working !!

 

What might be wrong in this code ?? Any tweaks ?? suggestions ????? 

 

Need to disable emails for a particular group

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