The ViralMarketingWP – Email Notifications addon enhances your viral marketing campaigns by adding configurable email notifications for both lead signups and reward unlocks. This powerful communication tool helps maintain engagement with campaign participants and keeps them informed about their progress and achievements.

Features

  • Lead Signup Notifications: Automatically send welcome emails to new participants
  • Reward Unlock Notifications: Notify participants when they unlock rewards
  • Admin Notifications: Receive alerts when new leads join campaigns
  • Customizable Email Templates: Personalize both subject lines and email content
  • Dynamic Placeholders: Use variables to create personalized email content
  • Global Default Settings: Set system-wide defaults for all campaigns
  • Campaign-Specific Settings: Override global defaults for individual campaigns
  • HTML Email Support: Format emails with HTML for better presentation

Requirements

  • WordPress 5.0 or higher
  • ViralMarketingWP plugin (core) installed and activated
  • PHP 7.0 or higher

Installation

  1. Download the ViralMarketingWP – Email Notifications addon from your account at viralmarketingwp.com
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded zip file and click Install Now
  4. After installation is complete, click Activate Plugin

Global Configuration

Accessing Global Email Settings

  1. Go to ViralMarketingWP > Settings in your WordPress admin
  2. Click on the Email Notifications tab

Available Global Settings

  • Admin Notification Email: Email address to receive admin notifications
  • From Email: Email address that will appear as the sender
  • From Name: Name that will appear as the sender
  • Default Lead Email Subject: Default subject line for lead notifications
  • Default Lead Email Template: Default content for lead notification emails
  • Default Reward Email Subject: Default subject line for reward notifications
  • Default Reward Email Template: Default content for reward notification emails

Default Email Templates

The plugin comes with pre-configured default templates that you can customize:

Default Lead Notification Template

Hi {first_name},

Thank you for joining our {campaign_title} campaign!

You can share your unique referral link with friends: {referral_url}

The more friends you refer, the more rewards you can unlock!

Thanks,
{site_name}

Default Reward Notification Template

Hi {first_name},

Congratulations! You've unlocked a reward in our {campaign_title} campaign!

Your Reward: {reward_title}

{reward_description}

Keep sharing your referral link to unlock more rewards: {referral_url}

Thanks,
{site_name}

Campaign-Specific Configuration

Each campaign can have its own email notification settings that override the global defaults.

Accessing Campaign Email Settings

  1. Edit an existing campaign or create a new one
  2. Scroll down to find the Email Notification Settings meta box

Available Campaign Settings

  • Enable lead signup notifications: Turn on/off email notifications for new leads
  • Send admin notification for new leads: Turn on/off notifications to admin when new leads join
  • Lead Email Subject: Subject line for lead notifications (for this campaign only)
  • Lead Email Template: Content for lead notifications (for this campaign only)
  • Enable reward unlock notifications: Turn on/off email notifications when rewards are unlocked
  • Reward Email Subject: Subject line for reward notifications (for this campaign only)
  • Reward Email Template: Content for reward notifications (for this campaign only)

Available Email Placeholders

Lead Notification Placeholders

PlaceholderDescription
{first_name}Lead’s first name
{last_name}Lead’s last name
{email}Lead’s email address
{campaign_title}Title of the campaign
{referral_url}Lead’s unique referral URL
{site_name}Your WordPress site name

Reward Notification Placeholders

PlaceholderDescription
{first_name}Lead’s first name
{last_name}Lead’s last name
{email}Lead’s email address
{campaign_title}Title of the campaign
{referral_url}Lead’s unique referral URL
{site_name}Your WordPress site name
{reward_title}Title of the unlocked reward
{reward_description}Description of the unlocked reward
{referral_count}Current number of referrals the lead has made

Email Workflow

Lead Signup Email Workflow

  1. A visitor signs up for your campaign and becomes a lead
  2. If lead notifications are enabled for the campaign:
    • The lead receives a welcome email with their referral link
    • If admin notifications are enabled, the admin receives a notification email

Reward Unlock Email Workflow

  1. A lead’s referral count reaches a reward threshold
  2. If reward notifications are enabled for the campaign:
    • The lead receives an email notifying them of the unlocked reward

Customizing Email Templates

HTML in Email Templates

The plugin supports HTML in email templates. When composing your templates, you can use basic HTML tags to format your content. For example:

<h2>Welcome to our campaign!</h2>
<p>Hi {first_name},</p>
<p>Thank you for joining our <strong>{campaign_title}</strong> campaign!</p>
<p>You can share your unique referral link with friends: <a href="{referral_url}">{referral_url}</a></p>
<p>The more friends you refer, the more rewards you can unlock!</p>
<hr>
<p>Thanks,<br>{site_name}</p>

Best Practices for Email Templates

  1. Keep it concise: Make your emails easy to read at a glance
  2. Highlight the referral link: Make it stand out with formatting
  3. Mobile-friendly: Keep your design simple and readable on mobile devices
  4. Clear call-to-action: Tell recipients exactly what you want them to do
  5. Personalize: Always use the name placeholders when available
  6. Test thoroughly: Send test emails to yourself before launching a campaign

Troubleshooting

Emails Not Being Sent

If emails are not being sent:

  1. Verify that notifications are enabled for the specific campaign
  2. Check that the recipient email address is valid
  3. Ensure your WordPress site can send emails (test with another plugin like Contact Form 7)
  4. Consider using an SMTP plugin to improve email deliverability

Placeholder Values Not Appearing

If placeholder values are not being replaced in emails:

  1. Check the spelling and format of your placeholders (including curly braces)
  2. Verify that the data exists (e.g., if a lead doesn’t have a first name entered, {first_name} will be blank)
  3. Ensure you’re using the correct placeholders for the email type (lead vs. reward)

HTML Not Rendering Correctly

If your HTML formatting isn’t displaying correctly:

  1. Make sure your HTML is properly formatted with opening and closing tags
  2. Test your email HTML with an email testing tool
  3. Keep your HTML simple – not all email clients support advanced HTML features

Advanced Customization

Customizing Email Headers

The plugin automatically sets up email headers with the “From” name and email specified in the settings. If you need to modify these headers further, you can use WordPress filters:

add_filter('wp_mail_headers', 'custom_email_headers', 10, 1);
function custom_email_headers($headers) {
    // Modify or add headers
    return $headers;
}

Adding Custom Placeholders

If you need to add custom placeholders beyond what’s provided, you can hook into the email sending process:

add_filter('wp_mail_content', 'add_custom_placeholders', 10, 2);
function add_custom_placeholders($content, $email_data) {
    // Add custom placeholders
    $content = str_replace('{custom_field}', 'Custom Value', $content);
    return $content;
}

Updates

This plugin receives regular updates to ensure compatibility with the latest versions of WordPress and ViralMarketingWP. Keep your plugin updated to ensure optimal functionality and security.