# Follow-Up Email a Few Days After Sign-Up

> Sends new users a second, friendly email a few days after they register, with tips or links to get started, scheduled automatically with WP-Cron.

- Type: PHP
- Runs: Run everywhere
- Category: [Email](https://wpide.com/library/category/email/)
- Tags: email, onboarding, users
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/email-follow-up-after-signup/

## Code

```php
$wpide_followup = array(
    'days'    => 3,
    'subject' => 'Getting the most out of {site}',
    'message' => "Hi {name},\n\nThanks for joining {site} a few days ago! Here are a few things to try next:\n\n• Complete your profile\n• Browse our latest articles\n• Reply to this email if you have any questions\n\nSee you soon!",
);

add_action( 'user_register', function ( $user_id ) use ( $wpide_followup ) {
    wp_schedule_single_event( time() + $wpide_followup['days'] * DAY_IN_SECONDS, 'wpide_followup_email', array( (int) $user_id ) );
} );

add_action( 'wpide_followup_email', function ( $user_id = 0 ) use ( $wpide_followup ) {
    $user = get_userdata( (int) $user_id );

    if ( ! $user || ! is_email( $user->user_email ) ) {
        return;
    }

    $site    = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
    $replace = array( '{name}' => $user->first_name ? $user->first_name : $user->display_name, '{site}' => $site );

    wp_mail( $user->user_email, strtr( $wpide_followup['subject'], $replace ), strtr( $wpide_followup['message'], $replace ) );
} );
```

## Notes

Edit the delay, subject and message at the top ({name} and {site} are replaced); the email is skipped if the account has been deleted meanwhile.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Follow-Up Email a Few Days After Sign-Up" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
