Send a Custom Welcome Email After Registration
Send a custom welcome email to new users after they register.
<?php
function custom_welcome_email($user_id) {
$user = get_userdata($user_id);
$to = $user->user_email;
$subject = 'Welcome to Our Site!';
$message = 'Hello ' . $user->first_name . ', welcome to our site!';
wp_mail($to, $subject, $message);
}
add_action('user_register', 'custom_welcome_email');
Post Comment