How to have WordPress send a user confirmation/validation email on signup

All we need is an easy explanation of the problem, so here it is.

I have a WP 3.3 installed and running great. My client would like to confirm a valid email address by sending the user a confirmation email containing a link to “confirm”. I have played around with Pie Register a little bit but cannot get it to send emails like it says it can.

Are there other plugins or tools out there capable of the same thing? I don’t think its a huge deal but the client won’t budge on it.

Also the site sends other emails just fine.


How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

This plugin does exactly what you need – Pie Register

From Plugin Directory:

Email Validation Hate fake emails? Make sure your users are not
registering with invalid email accounts by forcing them to click a
validation link that’s sent out with their registration email. This
sets there username to a random generated string (something like:
‘unverified__h439herld3’) so they can’t login until they hit that
validation link which will put their real username back in place
allowing them to login as per usual. Unverified registrations have a
defined grace period that will automatically delete an unverified
account after a specified period of time, so you don’t get clogged up
with those fakies. (Manage under Users > Unverified Users)

Method 2

maybe you server hasn’t a mail server ,you can use a plugin like WP-Mail-SMTP send email. but i find the pie register plugin register program is not safe,it can register same name and email if the previous register is not active.

Method 3

you can use the below when submitting the post of your registration form

$userdata = array(
    'user_pass' => $user_pass,
    'user_login' => esc_attr( $_POST['user_name'] ),
    'first_name' => esc_attr( $_POST['first_name'] ),
    'last_name' => esc_attr( $_POST['last_name'] ),
    'nickname' => esc_attr( $_POST['nickname'] ),
    'user_email' => esc_attr( $_POST['email'] ),
    'user_url' => esc_attr( $_POST['website'] ),
    'user_account_type' => esc_attr( $_POST['user_account_type'] ),
    'role' => get_option( 'default_role' ),

    $new_user = wp_insert_user( $userdata );
    wp_new_user_notification($new_user, $user_pass);

which will send confirmation mail to the user

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply