Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I edited the Add New User Profile page to add some custom fields (I'm not using multisite). My question is if there is a way to send out an activation/confirmation email to new users once I manually add them in?


share|improve this question

3 Answers 3

If you add a new user via the backend a confirmation email is sent automatically, unless you check the skip checkbox. The new user shouldn't appear in the UI until confirmed

share|improve this answer
When adding a user via the backend, the only option I have is "Send this password to the new user by email". However, it doesn't seem to work. Could it be because I'm using add_user_meta on the user_register action? –  stevetronix Dec 7 '12 at 18:03
user meta etc should have no impact. I advise you test with a gmail account and the + feature to simulate multiple accounts –  Tom J Nowell Dec 7 '12 at 18:55
up vote 1 down vote accepted

Solved it by adding this code to save_extra_profile_fields() in add_action ( 'user_register', 'save_extra_profile_fields');

$hash = md5( $random_number );
add_user_meta( $user_id, 'hash', $hash );

$user_info = get_userdata($user_id);
$to = $user_info->user_email;           

$subject = 'Member Verification'; 
$message = 'Hello,';
$message .= "\n\n";
$message .= 'Welcome...';
$message .= "\n\n";
$message .= 'Username: '.$un;
$message .= "\n";
$message .= 'Password: '.$pw;
$message .= "\n\n";
$message .= 'Please click this link to activate your account:';
$message .= home_url('/').'activate?id='.$un.'&key='.$hash;
$headers = 'From: noreply@test.com' . "\r\n";           
wp_mail($to, $subject, $message, $headers); 
share|improve this answer

stackexchange and found this for you! But you have to create a php page and do a little work, if you are familiar with WordPress than you can do this simply. I hope this answers your question and I hope this helps!

Send automatic email to user after wp_create_user

share|improve this answer
Thanks, do you know of any good tutorials that explain what to put into this PHP page? –  stevetronix Dec 7 '12 at 18:16
that page link should give you a great start. pretty much create a php page and add that code on link. –  wordpress_designer Dec 7 '12 at 19:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.