# Reply Directly to People Who Fill In WPForms

> Sets the Reply-To of WPForms notifications to the email address the visitor entered when no Reply-To is configured, so pressing Reply answers them.

- Type: PHP
- Runs: Run everywhere
- Category: [Forms](https://wpide.com/library/category/forms/)
- Tags: wpforms, notifications, reply-to
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/wpforms-reply-to-submitter/

## Code

```php
add_filter( 'wpforms_entry_email_atts', function ( $email, $fields ) {
    if ( ! empty( $email['replyto'] ) ) {
        return $email;
    }

    foreach ( (array) $fields as $field ) {
        if ( isset( $field['type'] ) && 'email' === $field['type'] && is_email( $field['value'] ) ) {
            $email['replyto'] = sanitize_email( $field['value'] );
            break;
        }
    }

    return $email;
}, 10, 2 );
```

## Notes

Uses the first email field of the form; notifications with their own Reply-To setting are not changed.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Reply Directly to People Who Fill In WPForms" 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/
