Jump to content

Domain Synchronisation Cron Report


MaikelVE

Recommended Posts

I'm not aware of any way of disabling just those emails. You can filter them via the mail server; that's what we've done. I'd suggest pushing them to a mailbox just for that, and check it weekly for problems, if you don't want to keep track daily. Alternately, you can just kill them (not recommended). 

Check this thread:

 

Edited by bear
Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hello,

There is no specific option to stop only those emails unfortunately, you can navigate to Setup > Staff Management > Administrator Roles and untick "System Emails (eg. Cron Notifications, Invalid Login Attempts, etc...)" but this will stop more than just the domain sync emails.

If this is not suitable, I would recommend adding some local filtering rules to discard those emails as they come in, using the subject as the base for creating the rule.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • 4 weeks later...

As a consultant installing WHMCS for other the very first question they ask me is about these automated emails for domain synchronisation.

I struggle to explain this to them:

 Setup > Staff Management > Administrator Roles and untick "System Emails (eg. Cron Notifications, Invalid Login Attempts, etc...)"


but this will stop more than just the domain sync emails.

Hopefully, one day, there will be a magic button where we can put this off.

Link to comment
Share on other sites

  • 5 months later...

There's no clean way to prevent email sending. If Domain Synch was an Email Template, we could have stop it via EmailPreSend. Sadly WHMCS sends it by directly requiring (or initializing) phpMailer file (or class).

The only solution is an hack. Edit phpMailer loader file so that it throws a die(); when it is included or initialized by crons/domainsync.php. It works but it is ugly and your change will be reverted back on every update of WHMCS.

A more sensical approach is to use a filter on your email so that the all incoming emails with "WHMCS Domain Synchronisation Cron Report" title automatically go in "Automatic email" folder. If like me you recieve a lot of such useless emails (I have access to hundreds of WHMCS systems that flood me with thousands cron/sync emails on a daily basis) also enable automatic cancellation after X days.

 

Edited by Kian
Link to comment
Share on other sites

  • 9 months later...
<?php

add_hook('EmailPreSend', 1, function ($vars) 
{
  $messageName = $vars['messagename'];

  $templateName = array(
    'WHMCS Domain Synchronisation Cron Report',

  );
 
  $merge_fields = array(); 
  if(in_array($messageName, $templateName))
  {  
      $merge_fields['abortsend'] = true;
  }

  return $merge_fields;
});

Why not use simple Hook? 
Event more Template names in Array possible to abort. 

Link to comment
Share on other sites

  • 10 months later...

Oh, I totally get how annoying that is—I had the same issue with my setup. What worked for me was going into the cron job settings and redirecting the email output to /dev/null, so it just runs silently in the background. It took care of all those daily reports cluttering my inbox! Give it a try, and it should stop the spam without messing with the actual function.


 

Link to comment
Share on other sites

There have been times in the past where the cron fails to sync, generally because of an issue with the registrar. Just my opinion, but better to receive these and know than to have it failing with no notifications of problems. I still recommend creating a "dead letter" mailbox just for them you can view once a day to be sure then toss all at once. 

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.

×
×
  • 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