The way to send duplicate email to the user?

Posted by Josephine on Stack Overflow See other posts from Stack Overflow or by Josephine
Published on 2012-03-27T11:17:04Z Indexed on 2012/03/27 11:29 UTC
Read the original article Hit count: 166

Filed under:
|

I made simple email in wordpress but it would only send email to the administrator email. I need to find the way to send duplicate email with Thanks to the user.

    $emailTo = get_option('tz_email');
    if (!isset($emailTo) || ($emailTo == '') ){
        $emailTo = get_option('admin_email');
    }
    $subject = 'I Have A Question to Ask from '.$name;
    $body = "Name: $name \n\nEmail: $email \n\nPhone: $phone \n\nComments: $comments";
    $headers = 'From: '.$name.' ' . "\r\n" . 'Reply-To: ' . $email;


    wp_mail($emailTo, $subject, $body, $headers);
    $emailSent = true;

    }

Insight is appreciated. Thank you.

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress