How to send activation mail in wplms

WPLMS (WordPress Learning Management System) is a popular plugin for creating online courses and managing student enrollment. Sending activation emails to new users is an essential feature in WPLMS. Here's a step-by-step guide on how to send activation emails in WPLMS:

Method 1: Using WPLMS Settings

  1. Log in to your WordPress dashboard and navigate to WPLMS > Settings.
  2. Click on the Emails tab.
  3. Scroll down to the Activation Email section.
  4. Enable the Send Activation Email option.
  5. Set the From Email and From Name fields to the desired values.
  6. Click Save Changes.

Method 2: Using WPLMS User Settings

  1. Log in to your WordPress dashboard and navigate to WPLMS > Users.
  2. Click on the Edit button next to the user you want to send the activation email to.
  3. Scroll down to the User Settings section.
  4. Click on the Edit button next to Activation Email.
  5. Enable the Send Activation Email option.
  6. Set the From Email and From Name fields to the desired values.
  7. Click Save Changes.

Method 3: Using a Custom Plugin or Code

If you want to customize the activation email or send it programmatically, you can use a custom plugin or code. Here's an example of how you can do it using a custom plugin:

  1. Create a new plugin file (e.g., wplms-activation-email.php) in the wp-content/plugins directory.
  2. Add the following code to the plugin file:
    
    <?php
    /*
    Plugin Name: WPLMS Activation Email
    Description: Send activation email to new users
    */

function wplms_send_activation_email($user_id) { $user = get_userdata($user_id); $activation_key = wplms_generate_activation_key($user_id); $email = wplms_get_email_template('activation'); $email->set_subject('Activate Your Account'); $email->set_body(array('activation_key' => $activation_key)); $email->set_from_email('[email protected]'); $email->set_from_name('Your Name'); $email->send($user->user_email); }

add_action('wplms_user_registered', 'wplms_send_activation_email');


3. Activate the plugin and test it by registering a new user.

In all cases, the activation email will be sent to the user's registered email address with a link to activate their account. The email will contain a unique activation key that the user must enter to activate their account.

Remember to customize the email template and settings according to your needs.