Mailrelay Sync Module

Mailrelay Sync Module

Developed By Canguro Hosting

Compatible with WHMCS v8.13

WHMCS Mailrelay Sync Module

This WHMCS addon synchronizes your WHMCS client list with your Mailrelay account. It supports manual synchronization, automatic synchronization via cron, and auto-sync when adding or editing clients.

Features

  • Sync WHMCS clients with specific Mailrelay groups.
  • Synchronize in batches of 250 clients (adjustable).
  • Avoids API rate limits with automatic delays.
  • Tracks synchronization progress using an offset saved in the database.
  • Resumes sync from the last offset (avoiding reprocessing).
  • Optionally sync new or updated clients automatically via WHMCS hooks.

Installation

  1. Upload the module to your WHMCS addons directory: /modules/addons/mailrelay/
  2. Activate the addon in WHMCS Admin > System Settings > Addon Modules.
  3. Configure:
  • Mailrelay Host: Your Mailrelay subdomain (without .ipzmarketing.com).
  • Mailrelay API Key: Your Mailrelay API key.
  • Groups to Sync: Comma-separated list of Mailrelay group IDs.
  • Auto Sync Clients: Enable or disable auto-sync on client creation or updates.

Manual Synchronization

Go to WHMCS Admin > Addon Modules > Mailrelay Sync, and click Manual Sync Now.

  • The module syncs up to 250 clients per run (limit configurable).
  • The offset tracks the last synchronized client to continue from there.
  • The offset resets to 0 once all clients are synchronized.

Cron Synchronization

You can configure a cron job to run the sync automatically every 24 hours.

Example Cron Command:

curl -s your_whmcs/modules/addons/mailrelay/cron_sync.php?key=YOUR_KEY

Replace:

  • YOUR_WHMCS: Your WHMCS installation.
  • YOUR_KEY: Replace with your configured GET key.

Secure Access:

  • The cron script requires a GET parameter (key) to prevent unauthorized execution. Set your preferred key in the cron command (key=YOUR_KEY).
  • Recommended schedule: Run once per day (every 24 hours).

Offset Mechanism

  • The offset keeps track of the last batch of clients synchronized.
  • The sync resumes from the last offset to avoid duplicate syncing.
  • When all clients are synced, the offset resets to 0.

This ensures that each run only processes new or unsynced clients.

License

MIT License.

Developed by

Jesus Suarez - Soporte Server https://soporteserver.com

 

There are no reviews yet!

Be the first to review Mailrelay Sync Module.

Version Compatibility


Compatible with WHMCS v8.13

Full Version Compatibility


  • All versions of WHMCS v8.13
  • All versions of WHMCS v8.12
  • All versions of WHMCS v8.11
  • Selected versions of WHMCS v8.10
        8.10.0
  • Selected versions of WHMCS v8.9
        8.9.0
  • Selected versions of WHMCS v8.8
        8.8.0
  • All versions of WHMCS v8.7
  • All versions of WHMCS v8.6
  • All versions of WHMCS v8.5
  • All versions of WHMCS v8.4
  • All versions of WHMCS v8.3
  • All versions of WHMCS v8.2
  • All versions of WHMCS v8.1
  • All versions of WHMCS v8.0

System Requirements


  • PHP 8.x
  • Access API Mailrelay

* Requirements listed are in addition to the WHMCS default system requirements.

Support for this product

The best place to start if you need help with a specific product is to contact the developer. All WHMCS Marketplace developers have both a website and support URL listed.

Developed By Canguro Hosting

Changelog

v1.0 Released April 28th, 2025

Latest Version


WHMCS Mailrelay Sync Addon with Cron & Auto Sync Hooks This commit includes the initial version of the WHMCS Mailrelay Sync addon. The module allows synchronization of WHMCS clients with Mailrelay subscriber groups.

Key Features:

  • Manual synchronization via the WHMCS admin interface (syncs 250 clients per run with offset tracking).
  • Offset management stored in the database (mod_mailrelay_sync) to resume syncing from the last processed client.
  • Auto sync functionality via WHMCS hooks (ClientAdd & ClientEdit) for immediate updates on client creation or modification.
  • Standalone cron script (cron_sync.php) for scheduled batch synchronization using a GET key for security.

Additional Details:

  • Displays synchronization progress, last offset, and last sync timestamp in the admin module.
  • Includes loading overlay during manual sync to prevent multiple submissions.

Tested on WHMCS 8.13 with Mailrelay API v1.0.

 

See also

Discord Notifications

A simplistic, free & open source hook allowing instant Discord notifications when an action is triggered.

Free
Netgsm Sms

Netgsm Sms addon provides you sending customized bulk sms and creating sms templates.

Free
MSG91 SMS/OTP Plugin

MSG91 WHMCS SMS plugin gives you the power and flexibility to stay connected with your customers by sending them an SMS and OTP's for 2FA at the crucial steps that matters the most.

Free
SMS Manager

More Advanced SMS System

Commercial
SMSQ Notify

Send SMS Notification From WHMCS by SMSQ Notify

Free