I know this is already a common question, i tried to google it. but its not helping. i tried to play with the codes but still not working.

            <th><label>Admin Email: </label></th>
            <td><input type="text"  name="adminemail" value="<?php echo esc_html( empty($options['adminemail'])?'':$options['adminemail'] ); ?>" /></td>
        $admin_mail = empty($options['adminemail'])?'':$options['adminemail'];
        $headers = 'Content-type: text/html';
        $email_title = htmlspecialchars_decode( get_bloginfo(), ENT_QUOTES ) . " - New Booking Made" ;
        @wp_mail( $admin_mail, $email_title, $message, $headers );
  • forgot to add this is also on the script \\---------------------\\ foreach ( array( 'adminemail' ) as $option_name ) { if ( isset( $_POST[$option_name] ) ) { $options[$option_name] = sanitize_text_field( $_POST[$option_name] ); } } Sep 28, 2017 at 22:05
  • Please try to better define your problem, it´s not really clear what you have tried up till right now...
    – flomei
    Sep 29, 2017 at 9:50

1 Answer 1


Ok even your question is difficult to read, here we go with I understand:

If you want to send one message to multiple email address you have more than one options but lets see two most used:

// One message to many addresses, this one is simplest, but every person will see each others email address
$tomail = '[email protected], [email protected], [email protected]';
wp_mail( $tomail, $email_title, $message, $headers );

// One message per each email address
$email_array = array('[email protected]', '[email protected]', '[email protected]');
foreach ( $email_array as $tomail ) {
    wp_mail( $tomail, $email_title, $message, $headers );

The second one seems the proper approach to you, but you need to take into account the number of addresses to which you want to send because if they are too many you can have problems with your hosting, less than 50 I do not see problems maybe up to 100. But this is relative and depends on your server.

PS if you want to send as BC or BCC just or chance the FROM, you have to use the headers part

// For me is better as array, better control on it 
$headers = array(
    'From: [email protected]', 
    'CC: [email protected]', 
    'CC: [email protected]', 
    'BCC: [email protected]', 
    'BCC: [email protected]' 
wp_mail( $tomail, $email_title, $message, $headers );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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