Email Configuration
Configure how LicenceForge sends email notifications — from sender identity and branding to expiry warnings and SMTP compatibility. All settings are managed through the LicenceForge settings panel in the WordPress admin.
Email Notifications Toggle
The master toggle controls whether LicenceForge sends any transactional emails at all.
| Option | Type | Default | Description |
|---|---|---|---|
wplf_email_notifications |
Checkbox (boolean) | true (enabled) |
Master toggle for all email notifications. When disabled, no transactional emails are sent for any license event. |
When wplf_email_notifications is disabled, customers will not receive any emails — including license key delivery after purchase and expiry warnings. Only disable this if you handle notifications through a separate system.
Sender Identity
These options control the "From" name and email address that appear on all outgoing emails.
| Option | Type | Default | Description |
|---|---|---|---|
wplf_email_from_name |
Text | Site name (get_bloginfo('name')) |
The name displayed as the email sender (e.g., "Acme Software"). |
wplf_email_from_address |
Admin email (get_option('admin_email')) |
The email address used as the sender. Must be a valid email address. |
If you set a custom from address, make sure the sending domain has valid SPF and DKIM records. Otherwise, emails may be flagged as spam or rejected by recipient mail servers. Your SMTP plugin documentation will have guidance on DNS configuration.
Branding Options
Branding options let you customise the appearance and links included in all email templates. These values are injected into emails via the global variables {brand_name}, {support_url}, and through the template rendering engine for the logo and accent colour.
| Option | Type | Default | Description |
|---|---|---|---|
wplf_brand_name |
Text | — | Your brand name, used in email headers and footers via {brand_name}. |
wplf_brand_color |
Colour picker | #0073aa |
Primary accent colour applied to email headers, buttons, and links. |
wplf_brand_logo_url |
URL (image) | — | URL of your brand logo displayed in the email header. Recommended size: 200 x 50 px. |
wplf_support_url |
URL | — | Link to your support page, available in templates via {support_url}. |
wplf_hide_branding |
Checkbox (boolean) | false |
When enabled, removes the LicenceForge branding from the email footer. |
Logo Guidelines
- Recommended dimensions: 200 x 50 pixels
- Use a transparent PNG or an SVG for best results on both light and dark backgrounds
- Provide an absolute URL (e.g.,
https://example.com/wp-content/uploads/logo.png) - The logo is displayed in the email header area above the main content
Brand Colour Usage
The wplf_brand_color value is applied to the following elements in the default email templates:
- Email header background
- Call-to-action button backgrounds (e.g., the renewal link in the expiry warning)
- Link text colour
If you use fully custom HTML in your template bodies, you can reference the brand colour via inline styles or by using the value from the settings.
Expiry Warning Cron
The license_expiring email is triggered by a scheduled cron job that runs once per day.
| Property | Value |
|---|---|
| Cron hook | check_expiring_licenses |
| Schedule | Daily |
| Warning period | 7 days before license expiry |
| Behaviour | Sends one license_expiring email per qualifying license |
The cron job queries for all active licenses with an expiry date exactly 7 days in the future and sends the license_expiring template to each matching customer.
WordPress cron is triggered by site visits. On low-traffic sites, scheduled events may be delayed. To ensure expiry warnings are sent on time, consider disabling wp-cron.php and setting up a system-level cron job instead:
Setting up a system cron
First, disable the built-in WordPress cron by adding this constant to wp-config.php:
define( 'DISABLE_WP_CRON', true );
Then add a system-level cron entry to trigger wp-cron.php on a regular schedule. For example, every 15 minutes:
*/15 * * * * wget -q -O /dev/null https://example.com/wp-cron.php?doing_wp_cron
This ensures all scheduled events, including the check_expiring_licenses job, run reliably regardless of site traffic.
SMTP Compatibility
All LicenceForge emails are sent via the WordPress wp_mail() function. This means any plugin that hooks into wp_mail() to route emails through an external SMTP provider will work automatically with LicenceForge.
Commonly used SMTP plugins
- WP Mail SMTP
- Post SMTP
- FluentSMTP
- Easy WP SMTP
No additional configuration is needed in LicenceForge — simply install and configure your preferred SMTP plugin, and all LicenceForge emails will be routed through it.
After configuring your SMTP plugin, use the Send Test Email feature in the template editor to confirm that emails are being delivered successfully through your SMTP provider.
Settings Reference
Complete list of all email-related options at a glance:
| Option Key | Type | Default | Purpose |
|---|---|---|---|
wplf_email_notifications |
Checkbox | true |
Master email toggle |
wplf_email_from_name |
Text | Site name | Sender display name |
wplf_email_from_address |
Admin email | Sender email address | |
wplf_brand_name |
Text | — | Brand name for email headers |
wplf_brand_color |
Colour | #0073aa |
Accent colour for email UI elements |
wplf_brand_logo_url |
URL | — | Logo image URL (200 x 50 px) |
wplf_support_url |
URL | — | Support page link |
wplf_hide_branding |
Checkbox | false |
Hide LicenceForge footer branding |