Client area login notifications for WHMCS Notifications are only sent when the IP is different from their last login.
To use localizations in the email notification, follow these steps:
- Follow the WHMCS guide to creating a custom email template.
- Set the Email Type to 'General' and the Unique name must be: User Login From Different IP
- Example Subject: "User Login from new IP {$user_ip} ({$user_hostname})"
- Example Message:
A user just accessed your account from a different IP than usual:
• Name: {$user_fullname}
• Email: {$user_email}
• IP Address: {$user_ip}
• City: {$user_city}
• Hostname: {$user_hostname}
You can manage the users allowed to access your account here: {$whmcs_url}/account/users
You can then set your translations in the email templates translations area.
- Found in the WHMCS forums here.
- Created by whmcsguru
- Contributions by brian!
- Rewritten by websavers
- WHMCS: Backwards compatibility was removed for code readability and so this only works with WHMCS 8.
- PHP: Tested with PHP 8.1. Probably works with PHP 7.4 and 8.0
This code uses IPLocate which provides 1000 daily requests free. Anything more and you will need to pay them. Given that we only utilize the IPLocate API when an IP has changed since the last user login, the free 1000 daily lookups are probably sufficient for most WHMCS users.