Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7574617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:28:44+00:00 2026-05-30T16:28:44+00:00

i have one contact form, when user submit all value will send(email) to admin.But

  • 0

i have one contact form, when user submit all value will send(email) to admin.But now i want to do when user submit admin will receive the email and user also will receive an email but with different body.

here my previous code :

<?php
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){

$name= $_POST["name"];
$email= $_POST["email"];
$phone= $_POST["phone"];
$company= $_POST["company"];
$message= $_POST["message"];

require_once('lib/class.phpmailer.php');

$mail             = new PHPMailer(); // defaults to using php "mail()"

$mail->AddReplyTo("admin@gmail.com","I Concept");

$mail->SetFrom('admin@gmail.com', 'I Concept');

$mail->AddReplyTo("admin@gmail.com","I Concept");

$address = "admin@gmail.com";
$mail->AddAddress($address, "I Concept");

$mail->Subject    = "MY - Request a Quote";

$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

$mail->Body = "<strong>Request a Quote from I Concept Malaysia Website</strong><br><br> 

Name : $name<br>
Email : $email<br> 
Phone : $phone<br> 
Company : $company<br> 
Enquiry : $message<br> <br> 

Thank You!<br>

";

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!<br>";
}


}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:28:45+00:00Added an answer on May 30, 2026 at 4:28 pm

    Try the following. Didn’t test but you basically need to get another PHPMailer object going and set the body and to information separately.

    $address = "admin@gmail.com";
    $mail->Subject    = "MY - Request a Quote";
    
    // keeps the current $mail settings and creates new object
    $mail2 = clone $mail;
    
    // mail to admin
    $mail->AddAddress($address, "I Concept");
    $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
    $mail->Body = "<strong>Request a Quote from I Concept Malaysia Website</strong><br><br> 
    
        Name : $name<br>
        Email : $email<br> 
        Phone : $phone<br> 
        Company : $company<br> 
        Enquiry : $message<br> <br> 
    
        Thank You!<br>";
    
    if(!$mail->Send()) {
        echo "Mailer Error: " . $mail->ErrorInfo;
    } else {
        echo "Message sent!<br>";
    }
    
    // now send to user.
    $mail2->AddAddress($email, $name);
    $mail2->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
    $mail2->Body = "Separate email body for user filling form out.";
    
    if(!$mail2->Send()) {
        echo "Mailer Error: " . $mail2->ErrorInfo;
    } else {
        echo "Message sent!<br>";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one contact form, that send the email to one of Address selected
Well, I have one form, similar to dajax django forms example, all is working
I have a contact form script and when the user submits it, they get
I have an HTML5 form set up like so: <form id=contact-form action=php/email.php> <fieldset> <ul
I'm using the jQuery Validation JS I have two contact forms, the main one
I have one hibernate sequence, that generates all sequence-numbers in my app. When I
I have one application which uses the standard .NET forms authentication cookie, now I
I have one user who gets an error message when he closes his browser.
I am sure this has been asked already, but I have been trying all
I have a search form field that I want to compare with multiple columns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.