# Send Admin Notifications to Several Addresses

> Delivers emails addressed to the site admin email (new users, comments, updates) to additional team members as well.

- Type: PHP
- Runs: Run everywhere
- Category: [Email](https://wpide.com/library/category/email/)
- Tags: email, admin, notifications, team
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/email-extra-admin-recipients/

## Code

```php
add_filter( 'wp_mail', function ( $atts ) {
    $extra = array(); // For example array( 'ops@yourdomain.com', 'owner@yourdomain.com' ).

    $admin = strtolower( (string) get_option( 'admin_email' ) );
    $to    = array_map( 'trim', is_array( $atts['to'] ) ? $atts['to'] : explode( ',', (string) $atts['to'] ) );

    if ( ! $extra || ! in_array( $admin, array_map( 'strtolower', $to ), true ) ) {
        return $atts;
    }

    $atts['to'] = array_values( array_unique( array_merge( $to, array_filter( $extra, 'is_email' ) ) ) );

    return $atts;
} );
```

## Notes

List the extra addresses in $extra. Emails to other recipients are not changed.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Send Admin Notifications to Several Addresses" 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/
