Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter colorlink

    (@colorlink)

    nm …
    all you have to do is to set a comma between

    like.

    [email protected] , [email protected]

    . many thanks

    That’s one way of doing it, or you can locate this chunk of code:

    if ($scf_options['scf_mail_function'] === 1) {
            mail($recipient, $topic, $fullmsg, $headers);
            if ($carbon == 1) mail($email, $topic, $fullmsg, $headers);
    } else {
            wp_mail($recipient, $topic, $fullmsg, $headers);
            if ($carbon == 1) wp_mail($email, $topic, $fullmsg, $headers);
    }

    ..as you can see, there is a conditional statement that determines if email is sent using mail() or wp_mail(). Adding more addresses would be done like so:

    if ($scf_options['scf_mail_function'] === 1) {
            mail($recipient, $topic, $fullmsg, $headers);
            mail('[email protected]', $topic, $fullmsg, $headers);
            mail('[email protected]', $topic, $fullmsg, $headers);
    
            if ($carbon == 1) mail($email, $topic, $fullmsg, $headers);
    } else {
            wp_mail($recipient, $topic, $fullmsg, $headers);
            wp_mail('[email protected]', $topic, $fullmsg, $headers);
            wp_mail('[email protected]', $topic, $fullmsg, $headers);
    
            if ($carbon == 1) wp_mail($email, $topic, $fullmsg, $headers);
    }

    Alternately you could use Cc/Bcc by adding to the $headers variable, or even some combination of methods, whichever works best for you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘multiple email recipients’ is closed to new replies.