Search code examples
phpemailgmailphpmailer

Separate Response for the two recipients phpmailer function


I want to send separate response for two different recipients in phpmailer function

if($mail->addAddress($email, $name)){
    $mail->Body = "Thanks for your response. our representative contact you soon....";
}

if($mail->addAddress('[email protected]', 'xxxx')){
    $mail->Body = $message;
}

Solution

  • This link may be help you

    you to create the separate instance for admin and client it will be easy like Jon Striling said