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
- Log in to your WordPress dashboard and navigate to WPLMS > Settings.
- Click on the Emails tab.
- Scroll down to the Activation Email section.
- Enable the Send Activation Email option.
- Set the From Email and From Name fields to the desired values.
- Click Save Changes.
Method 2: Using WPLMS User Settings
- Log in to your WordPress dashboard and navigate to WPLMS > Users.
- Click on the Edit button next to the user you want to send the activation email to.
- Scroll down to the User Settings section.
- Click on the Edit button next to Activation Email.
- Enable the Send Activation Email option.
- Set the From Email and From Name fields to the desired values.
- 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:
- Create a new plugin file (e.g.,
wplms-activation-email.php
) in thewp-content/plugins
directory. - 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.